You can set a breakpoint on a line, method, and exception, and if
you are running the JPDA, also on a class, thread, and variable.
To set a breakpoint, choose the breakpoint type from the combo box at the top
of the dialog box and specify its settings.
To set a breakpoint on | Do this |
---|---|
A line | Type a class name and a line number. |
method | Type a class name and a method name. |
An exception | Type the full name of the subclass of the exception
or error (for example, java.lang.InternalError ).
From the Stop on combo box, choose whether to trigger the breakpoint
when the exception is caught or not. |
A class
(JPDA only) |
Type the class name and, from the Breakpoint set on combo box, choose whether to trigger the breakpoint when the class is loaded into the virtual machine, unloaded from the virtual machine, or both. |
A thread
(JPDA only) |
From the Breakpoint set on combo box, choose whether to trigger the breakpoint when a thread starts, stops, or both. |
A variable
(JPDA only) |
Type the class and field names and, from the Stop on combo box, choose whether to trigger the breakpoint when the variable is accessed (for example, the method was called with the variable as an argument) or modified. |
If you are running the JPDA, you can set a condition on a breakpoint so that it triggers when an expression evaluates to true. For example, to stop at a breakpoint when x == 75, type x == 75
in the Condition text field.
You can apply two actions to a breakpoint:
{lineNumber}
, {className}
, and {threadName}
).
You can also use curly braces and a dollar sign to create a substitution
code for a watch (for example, {$mywatch}
).