Setting a Breakpoint on an Exception

  1. From the main menu, choose Debug and choose Add Breakpoint (Ctrl-Shift-F8).
  2. In the Add Breakpoint dialog box, select Exception from the Breakpoint Type combo box.
  3. Type the full class name (for example, java.lang.InternalError) in the Exception class name text field.
  4. From the Stop on combo box, select how to handle exceptions.

    You can choose to stop the debugger only on exceptions that are caught, only on unhandled exceptions, or all exceptions.

  5. To set a condition (so the breakpoint occurs when an expression evaluates to true), type the expression in the Condition text field.
  6. Select the desired actions:
  7. Click OK.

    The breakpoint is added to the list in the Breakpoints tab of the Debugger window.

See also
Setting a Breakpoint on a Line
Setting a Breakpoint on a Method Name
Setting a Breakpoint on a Class
Setting a Breakpoint on a Thread
Setting a Breakpoint on a Variable

Legal Notices