Setting an Exception Breakpoint
See Also
The following instructions are specific to the Java 2 debugger.
To set a breakpoint on an exception:
- From the main menu, choose Debug
New Breakpoint (Ctrl-Shift-F8).
- Set the Debugger combo box to Java.
- Set the Breakpoint Type to Exception.
- Specify the breakpoint settings.
- Package Name. The name of the package that contains
the exception that you want the debugger to stop on. If this field is already filled in, the information is based on the location of the insertion point in the Source Editor.
- Exception Class Name. The full class name of the exception or error.
- Stop on. When to trigger the breakpoint: when the exception is caught, when the exception is not caught, or on all exceptions.
- 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