Managing Conditional Breakpoints
An enabling condition can be applied to a breakpoint such that
breakpoint suspends execution of a thread in one of these cases:
- when the enabling condition is true
- when the enabling condition changes
To set a condition
A conditional breakpoint has a question mark overlay on the breakpoint
- In the Properties
view, click into the line where the
breakpoint is set.
- Press Ctrl+J
(Mac OS: Cmd+J) to open code editor. The
code editor will be opened with the line of
code corresponding to the one selected in the Properties
highlighted. Right-click (Mac OS: Ctrl+click) the breakpoint to which a
hit count is to be
added in the marker bar (vertical ruler)
and select Breakpoint
Properties from the popup menu. .
- The Properties
for... dialog box will be displayed.
- In the properties dialog, check the Enable Condition (code assist not
- Enter the expression for the breakpoint condition in the
- Do one of the following:
- If you want the breakpoint to stop every
time the condition evaluates to true,
select the condition is
option. The expression provided must be a boolean expression.
- If you want the breakpoint to stop only when the result
of the condition changes, select the value
of condition changes
- Click OK
to close the dialog and commit the changes. While the breakpoint is
enabled, thread execution suspends before that line of code is executed
if the breakpoint condition evaluates to true.