Setting a Method Breakpoint
See Also
The following instructions are specific to the Java 2 debugger.
To set a breakpoint on a method:
- From the main menu, choose Debug
New Breakpoint (Ctrl-Shift-F8).
- Set the Debugger combo box to Java.
- Set the Breakpoint Type to Method.
- Specify the breakpoint settings. If these fields are already filled in, the information is based on the location of the insertion point in the Source Editor.
- Package Name. The name of the package that contains
the method that you want the debugger to stop on.
- Class Name. The name of the class that contains
the method. If the
Apply Also to Anonymous Inner Classes checkbox is selected, the breakpoint also applies to all anonymous inner classes that
the specified class contains.
If an anonymous
class contains another inner class (either anonymous or named), the
breakpoint also applies to that inner class.
- Method Name. The name of the method. If you want to apply the breakpoint to all methods of
the specified class, select the All Methods for Given Classes checkbox.
- Condition. A Boolean expression that triggers the breakpoint when the expression evaluates to True.
For information on the syntax rules for setting a condition, see Setting a Condition on a Breakpoint.
- Specify the actions to take when the breakpoint is triggered:
-
Suspend Debugging. If selected, all threads in the debugged program are temporarily stopped.
- Print Text. If selected, the specified message is printed in the Debugger Console view in the Output window. For information on the tags you can include in the message, see Printing a Breakpoint Message.
- Click OK.
The breakpoint is added to the Breakpoints window.
Legal Notices