Breakpoint Conditions

Every breakpoint, including watchpoints, can have a condition. This condition is an expression evaluated when the breakpoint is hit to produce a true or false result. If the expression is true or evaluation of the expression fails, execution of the program you are debugging halts. If the expression is false, the program you are debugging keeps executing.

Breakpoint conditions are inherited. For example, setting a condition on a class breakpoint sets the same condition on the all the child class instance breakpoints.

Setting conditions on a breakpoint overrides any conditions that breakpoint may have inherited.

There are two special variables which may be used in breakpoint condition expressions:

__hitCount
This is the number of times the breakpoint has been encountered. This variable is always incremented before the condition is evaluated. __hitCount is not incremented if the breakpoint is disabled.
__threadId
This is the ordinal number of the thread in which the breakpoint is being evaluated.

Note that both variables start with two (2) underscores. These variables are integer types.


ngrelc.gif (533 bytes)
Types of Breakpoints
Expressions Supported by the Debugger

ngrelt.gif (466 bytes)
Set Conditions on Breakpoints
Remove Conditions from Breakpoints