There are a few Arduino boards that contain debugWIRE MCUs. Among them is the famous Arduino Uno R3, which uses the ATmega328P. Equally popular are the Arduino Nano and the Arduino Pro Mini, which have smaller form factors but the same MCU. When one goes through the list of boards displayed in the Arduino IDE under the Arduino AVR Boards menu, one finds many boards with debugWIRE MCUs, most of them using the ATmega328P. However, there is also one using the ATtiny85 (Arduino Gemma).
Requirements on the electrical characteristics of the RESET line
When you want to debug an Arduino sketch running on an Arduino board, you first need to modify the board so that the RESET line can be used for debugWIRE communication. As stated in the user manual of PICkit5, one should avoid the following:
- a capacitor connected to the RESET line,
- a pull-up resistor of less then 10 kΩ on the RESET line, and
- any external RESET circuits connected to the RESET line.
On Arduino boards, a capacitor is usually connected to the DTR output of the USB/UART converter on one side and to the RESET line on the other. This implements the auto-RESET feature, which starts the bootloader every time a serial connection to the board is established as shown below.

The 100 nF capacitor is the one that needs to be cut off from the RESET line. How to modify the boards to enable debugging is described on this page.
Debugging with an Arduino board
Once you have physically prepared your board, you can start debugging, which will bring your board into debugWIRE mode. However, before that, it may be necessary to clear the lock bits of the MCU, which is done by completely erasing the MCU. This will also wipe out the bootloader. For this reason, it is a good idea to disable the BOOTRST fuse. This fuse forces the MCU to start at the beginning of the bootloader instead of at location 0x0000. Now you can set the DWEN (debugWIRE enable) fuse, power-cycle the board, and start to debug. All of that can be done automatically in the background, or the debugging tool forces you to do that manually, or you have to figure that out all by yourself.
After Debugging
After you are done with debugging, you may want to restore the normal state of the board. This means, first of all, switching the MCU back into the normal state. Usually, the debugger offers an action to do that. If you have a recent version of avrdude at your disposable (>= 7.3), then this program can instruct the debugger to switch back to normal mode. For instance, if you use the Arduino IDE command Burn Bootloader
, then this will happen. Because you probably want to restore the bootloader in any way, using this command is a good idea.
While it is possible to undo the physical modifications of the board, I would rather mark the board as one that should only be used for debugging. Otherwise, you have to engage in removing capacitors and/or resistors the next time around when you want to use the debugger again. In any case, you can upload code using the bootloader even without the auto-RESET feature. You just have to press the RESET button when avrdude announces that the upload will start.