How to setup Arduino IDE 2 debug configuration?

I’m using the Arduino IDE 2.0 and would like to setup a hw debugger for an Arduino Mega project. How do I have to configure the launch.json file for , let’s say the ATMEL Snap?

What hardware debugger? The only thing I have is the Serial.print() and the testpin which I defined. The The Snap is compatible with MPLAB X IDE version 5.05 and later, not the Arduino IDE.

Some people are able to debug on the Arduino IDE 2 with hw debuggers. This guy here Getting started with the Arduino IDE 2.0 debugger is able to debug an Arduino Nano 33 BLE using the J-Link EDU Mini as hw debugger.

Arduino IDE 2 is based on Eclipse Theia, which is based on VSCode. One should be able to use any JTAG debugger which is compatible with the MCU on the Arduino board you use (Announcing the Arduino IDE 2.0 (beta) | Arduino Blog).

Your topic has been moved here as this forum section is more appropriate than where it was originally posted

Previous discussion:

I’ve to use an Arduino Mega and would like to use the Arduino IDE 2.0 with it. Which debuggers are compatible with this dev setup?

The MCU on the board is a ATMEGA2560, which seems to be compatible with the debuggers:

  • PICkIt
  • Snap
  • Atmel-ICE
  • Power Debugger

Your topic has been moved here as this forum section is more appropriate than where it was originally posted

Hi, welcome to the forum.

If you have a background in embedded programming, then you would like to debug the code. If you have been using Arduino for a while, it becomes less important.

The ATmega2560 has a JTAG interface for debugging. I think a fuse has to be set, and that is not implemented in the Arduino as far as I know.

In this blog you can read: “As of today, the debugger supports all the Arduino boards based on the SAMD and Mbed platforms”.

Arduino is about fast prototyping and learning about electronics and programming. That means a standard set of libraries is used for every board. Your “sketch” is the part where programming logic is important.
We send messages to the serial monitor to see what is going on. Also a oscilloscope and a logic analyzer might be needed to solve a problem.

What do you want to debug ?

I got used to it, to have no debugger, others still miss it. I must admit that I used a simulator with a debug option to find a problem.

Cross-posts merged.

Thanks a lot!

The Arduino platform is great for hobby projects and easy rapid prototyping. But my logic will become a bit more complex over time. I’ve used STM32 MCUs in the past which has great hardware debugger support. Developing w.o. a debugger is pain in the ass in my opinion :sweat_smile:!

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.