Setting a Breakpoint on a Class
When you set a breakpoint on a class (for example,
javax.swing.JButton
), you can choose to stop the debugger
when the class is loaded into the
virtual machine, unloaded from the virtual machine, or both.
To set a breakpoint on a class:
- From the main menu, choose Debug
Add Breakpoint (Ctrl-Shift-F8).
- In the Add Breakpoint dialog box, select Class from the Breakpoint
Type combo box.
- Type the class name in the Class filter text field.
- From the Breakpoint set on combo box, determine whether
to trigger the breakpoint when the class is loaded into the virtual machine, when the class is unloaded from the virtual machine, or both.
- Select the desired actions:
- Suspend debugging temporarily stops all threads in the debugging session when the program reaches the breakpoint.
- Print text prints a message in the Output window
when program execution stops on the breakpoint. You can use a combination of text,
substitution codes, curly braces, and a dollar sign in the message
(for example,
{$mywatch}
).
- Click OK.
The breakpoint is added to the list in the Breakpoints tab of the
Debugger window.
Legal Notices