Creating a Conditional Breakpoint
Related Topics:
You can make any breakpoint conditional by choosing the option If. The debugger suspends execution when the breakpoint is hit, the condition set in the If option is met, and the parent event occurs.
To make a current breakpoint conditional:
- 1. In the Debugging Window, choose Windows
Breakpoint or Execute
Set Breakpoints.
- 2. Select the breakpoint in the scrolling list.
- 3. If the Details pane of the Breakpoints window is not displayed, click the Add/Change Breakpoint button (the Add/Change Breakpoint window toggles to Hide Details).
- 4. Choose Option
If and type any valid expression, including function calls, that evaluates to a Boolean or integer, in the Option text box.
- 5. Click Change.
To create a conditional breakpoint in the Breakpoints window:
- 1. In the Debugging window, choose Windows
Breakpoint or Execute
Set Breakpoints.
- 2. If the Details pane is not displayed, click the Add/Change Breakpoint button (the Add/Change Breakpoint window toggles to Hide Details).
- 3. Choose an event and type the event information in the Event text box.
- 4. Choose Action
Stop.
- 5. Choose Option
If and type any valid expression, including function calls, that evaluates to a Boolean or integer, in the Option text box.
- 6. Click Add.