arduino-ide
arduino-ide copied to clipboard
Cannot upload when debugging
Describe the problem
When a debug session is active, the upload fails. This is expected, but it probably has to be better communicated to users.

To reproduce
- Start a debug session,
- Set a breakpoint,
- Upload,
Sketch uses 14364 bytes (5%) of program storage space. Maximum is 262144 bytes.
Global variables use 2996 bytes (9%) of dynamic memory, leaving 29772 bytes for local variables. Maximum is 32768 bytes.
Open On-Chip Debugger 0.10.0+dev-gf0767a31 (2018-06-11-13:48)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 0
none separate
adapter speed: 400 kHz
cortex_m reset_config sysresetreq
Error: unable to open CMSIS-DAP device 0x3eb:0x2157
Error: No Valid JTAG Interface Configured.
Failed uploading: uploading error: exit status 255
Expected behavior
A message explaining that the debugger is running would be sufficient. Or stop the active debug session, upload, and restart the debug session.
Arduino IDE version
2.0.3
Operating system
macOS
Operating system version
12.5.1
Additional context
No response
Issue checklist
- [X] I searched for previous reports in the issue tracker
- [X] I verified the problem still occurs when using the latest nightly build
- [X] My report contains all necessary details
Hello, I'm suffering from this same issue. When using Picoprobe (CMSIS-DAP) as upload method, the uploading sequence will just repeatedly attempt an upload if a debug session was already running.
The "stop" button no longer works when in this state.
The only way to recover from this situation is to restart Arduino IDE 2.0 and unplug/reinsert the Picoprobe.
Sincerely, Marcus