cancel
Showing results for 
Search instead for 
Did you mean: 

Disable Breakpoints in Release Build

Ddu P
Associate II

How can I disable breakpoints for release builds? If I accidentally forget a breakpoint on, and it gets hit in the release build, then the program just freezes (including halting the watchdog timer!) - what am I missing?

1 ACCEPTED SOLUTION

Accepted Solutions
Cartu38 OpenDev
Lead II

Nothing related to build here but debug / run. Having breakpoint set is not leading to any compile result variation.

If you're expecting to run your application getting rid of existing breakpoints just disable them Thanks "Run > Skip All BreakPoints" or dedicqted toolbar shortcut icon:

0693W000006FOwIQAW.jpg 

View solution in original post

6 REPLIES 6
Cartu38 OpenDev
Lead II

Nothing related to build here but debug / run. Having breakpoint set is not leading to any compile result variation.

If you're expecting to run your application getting rid of existing breakpoints just disable them Thanks "Run > Skip All BreakPoints" or dedicqted toolbar shortcut icon:

0693W000006FOwIQAW.jpg 

Thanks! 🙂

I did see the "Skip All Breakpoints", which I've now taken to enabling before building (still not an ideal solution however).

"Nothing related to build here"

I would have thought so, but that does not seem to be what I am seeing! I am guessing that the hardware breakpoints are being hit, even though I don't have the debugger running (it is still plugged in however).

Sure some impact if whole process but no impact on compiler produced binary.

Please mark as answered if ok to you. It will help community to dig shortly into valuable material.

Pavel A.
Evangelist III

>  then the program just freezes

When debugger is not active, the breakpoint instruction causes "debug monitor" exception.

If it is not specially enabled it escalates to hardfault. So you're getting a hardfault.

The simplest is not to use breakpoint instructions in release configuration.

Or, in release mode you can enable the "debug monitor" handler and dismiss these exceptions (complicated).

-- pa

This is helpful info, thank-you. Why does the WDT not reset the chip once the hard-fault is hit? (Or perhaps it does, and the continual resetting looked to me like a hang - I would have to retest to verify.)

I clicked "Select as Best", as I could not find a "Mark as Answered" anywhere - I hope that is correct.