Setting a Conditional Breakpoint
See Also
You can set conditions on a breakpoint so that execution only breaks if the
condition is true. You can set conditions on any breakpoint except thread and
class breakpoints.
To set conditions on a breakpoint:
- Create a new breakpoint or open an existing breakpoint's customizer as described
above.
- Type the condition in the Condition field. The condition must follow the
Java syntax rules. The condition may include anything that can be on the right
side of the equal sign (=). The condition may also include variables
and methods that are within the current context. The following are exceptions:
- Imports are ignored. You must use fully qualified names, such as obj
instanceof java.lang.String.
- You cannot access outerclass methods and variables directly. Use this.variableName
or this$1.
Conditional line breakpoints have a
icon in the left margin of the Source Editor.
- See Also
- Breakpoints in the IDE
- Setting a Java Breakpoint
- Organizing Breakpoints Into a Group
- About Debugging Java Applications
Legal Notices