cancel
Showing results for 
Search instead for 
Did you mean: 

Debugger stuck on random line

The debugger is getting stuck on a random line about 350 lines into main(). There is nothing particular about this line of source code except its location, because if I comment out that line it just stops on the next one, and if I add a line it stops earlier. When the debugger is not active, the source runs just fine without stopping in that area. I have deleted all breakpoints and watchpoints. I have set the optimizations to "off". When the debugger is stuck on that line, its status is "running."

This is my first time debugging this project after converting from TrueStudio. I may need to switch back if I can't find anything else to try.

Any suggestions?

21 REPLIES 21
HCour.1
Associate II

I got stuck with this same problem today - After trying to add too many breakpoints.

The fix was:

  • Disconnect the ST-LINK debugger,
  • Remove power from the board
  • Then restart everything.

I suspect there is a breakpoint register somewhere in the core that the debugger "forgets" about, and it needs a power cycle to clear that register.

JLope.11
Associate III

It worked for me: Made Clean and compile again