Debug advice for avr 4809 or a different chip

Hello,

I came across Platformio whilst searching for a richer environment than that provided by the Arduino IDE

I like PIO and it has allowed me to develop my programming horizons and explore some baremetal stuff. I’ve built a basic shaft encoder project based around an avr 4809. I chose the chip because it has 4 usarts, which facilitates comms between the encoder mcu, another MCU and two win 10 PCs.

Support in the PIO forum has been great, I’ve had PIO support and also programming support.

Some of my future projects are more complex and will need debug features, and by that I mean being able to set breakpoints, watch variables/ registers, resume program
execution etc. I used to accomplish that by using atmel studio 7 and Visual Micro add in.

So having explained some context, I now need to have some debug facility for the 4809 chip, but my research has basically drawn a blank outside of the world of Microchip studio.
There are some debug tools like MCUdudes MEDBG, but can I use this with PIO?

If not, I’m flexible and perhaps I need to change my chip selection criteria to include “chip can be debugged using Platformio”.

I’d appreciate any advice on
a) whether debug features for the 4809 can be facilitated in PIO and if so do I need any additional hardware,
or
b) How do I go about selecting a chip that can be debugged - need 4 USART and approx 48k program memory.

thanks,
Paul