
The easiest way to do this is via the Tools->Device Programming command in Atmel Studio: The last step required before we can proceed with debugging is to program the DWEN fuse on the device.Connect your AVR debug probe to the ICSP connector on the Arduino Uno board:.Installing the jumper will prevent debugging, but will restore the original bootloader functionality. Then solder a pair of jumper terminals to the pads: As long as the jumper is not installed, the board can be debugged using an AVR debug probe, however programming FLASH memory via a bootloder won’t work. Locate the “RESET-EN” pad on the board (see the schematic) and cut the line between the 2 pads.
Before we proceed with debugging, we need to modify the board to allow disconnecting the capacitor.
The original Arduino Uno board contains a capacitor that facilitates resetting the board into bootloader programmatically, however this capacitor prevents the AVR debug probes from debugging the board properly. If you are already using an AVR-based Arduino board, follow the instructions in this tutorial to enable and disable the debug mode. For all new designs, we recommend using ARM-based or ESP32-based devices that don’t have this limitation. Enabling the debug mode makes regular FLASH programming via bootloader unusable disabling it makes the debugging impossible. Warning: due to the limitations of the AVR architecture, the AVR devices need to be explicitly switched between the production mode (DWEN fuse not set) and the debug mode (DWEN fuse set). AVR Dragon) and follow our basic Arduino tutorial to create a simple project. Before you begin, install VisualGDB 5.4 Preview 4 or later, get an AVR debug probe (e.g. This tutorial shows how to debug the AVR-based Arduino boards using Visual Studio and the Advanced Arduino Project Subsystem of VisualGDB.