The Add Breakpoint dialog box enables you to set a breakpoint
in your code in order to pause execution of your program. Open this dialog box from
the main window by
choosing Debug Add Breakpoint.
The following table describes the breakpoint types for the Java debugger.
Breakpoint Type | Description |
---|---|
Line | The easiest way to set a breakpoint on a line is from within the Source Editor. Click the left margin adjacent to the line where you want to set your breakpoint. Use the Add Breakpoint dialog box if you want to specify an action to perform when the breakpoint is hit or to trigger the breakpoint only when a specified condition is met. See Setting a Breakpoint on a Line for a description of the settings and actions that apply to this breakpoint type. |
Method | When you set a breakpoint on a method name, program execution stops every time the method is executed. See Setting a Breakpoint on a Method Name for a description of the settings and actions that apply to this breakpoint type. |
Exception | You have several options for setting a breakpoint on an exception. You can break whenever a specific exception is caught, whenever a specific exception is not handled in the source code, or whenever any exception is encountered regardless of whether the program handles the error or not. See Setting a Breakpoint on an Exception for a description of the settings and actions that apply to this breakpoint type. |
Class | When you set a breakpoint on a class, you can stop the debugger when the class is loaded into the virtual machine, unloaded from the virtual machine, or both. See Setting a Breakpoint on a Class for a description of the settings and actions that apply to this breakpoint type. |
Thread | You can break program execution whenever a thread starts, stops, or both. See Setting a Breakpoint on a Thread for a description of the settings and actions that apply to this breakpoint type. |
Variable | You can stop execution of your program whenever a variable in a specific class and field is accessed (for example, the method was called with the variable as an argument) or modified. See Setting a Breakpoint on a Variable for a description of the settings and actions that apply to this breakpoint type. |
See also | |
---|---|
Conditional Breakpoints |