Skip to main content
Andrew Neil
Super User
July 13, 2026
Question

Need ability to cancel debug session on connection failure.

  • July 13, 2026
  • 1 reply
  • 17 views

When the connection fails “unexpectedly”, CubeIDE keeps re-trying for a long time:

 

Although “unexpected” to the IDE, the reason may be obvious to the user - so it would be useful to be able to cancel these retries, exit the Debug Session, and return to the C/C++ perspective.

 

See also:

 

1 reply

ST Technical Moderator
July 14, 2026

Hello ​@Andrew Neil 

Let me thank you for your feedback.

I reproduced the behavior described in STM32CubeIDE, and when the connection fails “unexpectedly,” CubeIDE does not continue to retry for very long:

 

Thanks.

Mahmoud

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Andrew Neil
Super User
July 14, 2026

Hmmm … I’m using CubeIDE v2.1.1 on Windows 11 Pro - you can see that it does take *much* longer than yours.

I think it always has done - certainly in v1.13.0

The above is with the ST-Link of a Nucleo-F030, when the SWD pins are set to analogue by the application.

So the target remains powered-up and physically connected, but SWD comms is lost.

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Andrew Neil
Super User
July 14, 2026

The above is with the ST-Link of a Nucleo-F030, when the SWD pins are set to analogue by the application.

 

@Mahmoud Ben Romdhane - If I do just remove the Target power, it does timeout a lot quicker:

That takes ~11s

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.