Breakpoints are typically attached to a particular line of code; they pause the debugger when a particular line of code is about to be executed. Also, you can set a breakpoint to be activated when a certain type of exception is thrown. Exception breakpoints are not associated with a particular line of code.
To set an exception breakpoint:
In the Breakpoints window, right-click and choose New Breakpoint.
The New Breakpoint dialog appears.
In the Definition tab, select the Exception Breakpoint from the dropdown list.
In the Exception Breakpoint Details area, enter the fully qualified name for the exception.
If desired, select or clear the Break for caught or Break for uncaught exceptions check boxes (both are selected by default).
Click OK.
The debugger will now pause if an exception of the specified type is thrown.
By default, the debugger automatically creates a persistent exception
breakpoint for uncaught throws for java.lang.Throwable
.
This breakpoint will occur whenever an uncaught exception is thrown. You
cannot delete a persistent breakpoint, although you can disable it
Copyright © 1997, 2004, Oracle. All rights reserved.