Arduino IDE 2

If you want to debug one of the debugWIRE MCUs in the Arduino IDE 2, meanwhile, you find a solution that works out of the box. Three cores exist that support the programming of these chips, namely, ATTinyCore for the classic ATtinys, MicroCore for the ATtiny13, and MiniCore for the ATmegaX8 family. Recently, I extended the corresponding board manager files to make debugging possible by simply clicking on the debug symbol. You only need to insert the following board manager URLs in the preference dialog:

https://felias-fogg.github.io/ATTinyCore/package_drazzy.com_ATTinyCore_index.json
https://mcudude.github.io/MicroCore/package_MCUdude_MicroCore_index.json
https://mcudude.github.io/MiniCore/package_MCUdude_MiniCore_index.json

After that, install the most recent version of the cores. And that is (almost) all! Well, you might have to modify the board to meet the requirements on the electrical characteristics of the RESET line. And as a Linux user, you may have to fiddle with some permissions.

As a hardware debugger, you can use any of Microchip’s EDBG-based hardware debuggers or the DIY Uno-based debugger dw-link.

If you want to debug an Arduino board with an ATmega328P or ATmega168P on it, use MiniCore, and choose ATmega328 or ATmega168 in the Tools menu. You may want to further refine parameters, such as clock etc.

Now, after connecting the hardware debugger to your target, you can then start debugging.