Breaking On Condition

Related Topics:

Data Change Tracking Breaking On Value Change
Breaking On Modify Breakpoints Window

The On Condition breakpoint accepts an arbitrary integer expression, and triggers when the expression evaluates to Boolean, or true. Like On Value Change, On Condition uses implicit single-stepping and is often quite slow.

To set an On Condition breakpoint:

1. In the Debugging Window, choose Windows Breakpoints or Execute Set Breakpoints.

2. If the Details pane of the Breakpoints window is not displayed, click the Add/Change Breakpoint button (the Add/Change Breakpoint button toggles to Hide Details).

3. Choose Event On Condition and type the expression you want to watch in the Event text box. For example:
a > b

4. Choose Action Stop.

5. Click on Add.

The breakpoint triggers after the line that causes the expression to have a nonzero value.


Note - To improve execution speed, you can limit single-stepping to a particular function using Option While in.