arduino / arduino-ide

Arduino IDE 2.x
https://www.arduino.cc/en/software
GNU Affero General Public License v3.0
2.23k stars 379 forks source link

Cannot upload when debugging #1846

Open kittaakos opened 1 year ago

kittaakos commented 1 year ago

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.

Screen Shot 2023-01-31 at 09 44 01

To reproduce

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

MarcusGarfunkel commented 1 year ago

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.

image

The "stop" button no longer works when in this state.

image

The only way to recover from this situation is to restart Arduino IDE 2.0 and unplug/reinsert the Picoprobe.

Sincerely, Marcus