Skip to main content
Ddu P
Associate III
December 10, 2020
Solved

Disable Breakpoints in Release Build

  • December 10, 2020
  • 6 replies
  • 1712 views

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?

This topic has been closed for replies.
Best answer by Cartu38 OpenDev

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 

6 replies

Cartu38 OpenDev
Cartu38 OpenDevBest answer
Graduate II
December 11, 2020

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 

Ddu P
Ddu PAuthor
Associate III
December 11, 2020

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).

Cartu38 OpenDev
Graduate II
December 11, 2020

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.
December 11, 2020

>  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

Ddu P
Ddu PAuthor
Associate III
December 16, 2020

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.)