After you've set your breakpoint or watchpoint, the IDE unconditionally halts the
program when:
- it reaches a line of code that the breakpoint is set on
or:
- the expression specified by the watchpoint becomes true
To set the properties for a breakpoint or watchpoint:
-
In the Breakpoints view, right-click the breakpoint or watchpoint and select
the Properties… item. (For breakpoints only, in
the C/C++ editor, right-click the breakpoint and select Breakpoint
Properties….)
-
Use the Common panel to modify the watchpoint's
behavior.
-
In the Condition field, enter the Boolean expression to
evaluate. The expression may be anything that can be evaluated inside an
if statement (e.g. x > y). The
default is TRUE.
-
In the Ignore Count field, enter the number of times the
breakpoint or watchpoint may be hit before it begins to take effect (not the
number of times the condition is true). The default is 0.
-
To restrict the breakpoint to specific threads, make sure they're selected in
the Filtering panel:
-
Click OK. When in debug mode, your program stops when it
meets the conditions you've set for the breakpoint or watchpoint.