Skip to main content
TJack.2
Associate III
February 13, 2021
Solved

Debug terminated immediately on start (Solved)

I had been debugging this program for some time with no problems. After making change to a header file to resolve a conflict, the debugger would no longer run. The program compiled , loaded and verified OK, but as soon as the debug perspective appeared the console reported "connection lost" "shutting down" and the C/C++ perspective returned. The board itself ran OK, and other programs ran and debugged OK on it, but this one program always caused GDB to terminate. I was using "ST-Link GDB server", but I got the same problem with "OpenOCD".

I couldn't find any way to diagnose the problem, just asking "What have I changed?".

Eventually I discovered it was a value in the Expressions window, that had been invalidated by the change in the header file, that was causing GDB to exit. Not sure whether this is a problem with CubeIDE or with GDB as there doesn't seem to be any diagnostics.

This topic has been closed for replies.
Aurel
AurelBest answer
Associate
January 26, 2023

Remove all expression in "expressions" & "live expressions" views.

3 replies

BAl K.1
Associate III
January 3, 2023

hello sir, i have the same problem, could you share the solution of this problem?? thank you

Aurel
AurelBest answer
Associate
January 26, 2023

Remove all expression in "expressions" & "live expressions" views.

Aurel
Associate
January 26, 2023

Thanks a lot, It solves my problem...