Set a Conditional Breakpoint on the Xth pass
In this tutorial, you will learn:
•how to set an execution breakpoint,
•apply conditions based on pass count and expressions, and
•utilize optional features like displaying message boxes.
To stop the microcontroller on the Xth pass through a function, winIDEA offers option conditional breakpoints: each time the breakpoint is passed the expression (if present) will be evaluated and if it evaluates to true, it will count as one more pass. When the breakpoint is passed as many times as specified in the pass count, the breakpoint will be hit and the CPU will be stopped.
Set a breakpoint. |
---|
Open Debug | Breakpoints. |
---|
Check the Enable box in the Condition section. |
---|
Set the Pass count and optionally define Expression. |
---|
You can display message box when a conditional breakpoint hits.
(optional) Add the Expression to Watches and enable Real time. |
You can observe the value changing.
Run the application. |
winIDEA will show RUNNING Debug Status in the bottom right corner.
•Breakpoints - Video Tutorial
•Breakpoint bisecting - Video Tutorial
•Breakpoints plugin - Enhanced view for faster manipulation of all the breakpoints in the project
•Breakpoint Wizard - Configure the hardware breakpoint either as execution breakpoint or access breakpoint