Setting a Java Breakpoint

See Also

Except for line breakpoints, all Java breakpoints are defined globally and therefore affect all IDE projects that include the source on which a breakpoint is set. For example, if you set a class breakpoint on com.me.MyClass in one project, the IDE will stop execution every time it encounters that class during a debugging session for other projects that include the class.

To set a line breakpoint:

To set all other types of breakpoints:

  1. In the Source Editor, select the code element on which you want to set a breakpoint. For example, if you want to set a class breakpoint on the class BeanCounter, select the class name in the class declaration.
  2. Choose Run > New Breakpoint (Ctrl-Shift-F8).

    The New Breakpoint dialog box opens with a suggested breakpoint type and target filled in.

  3. If necessary, adjust the suggested breakpoint type in the Breakpoint Type combo box.
  4. Enter the package and class name for which you want to set the breakpoint.
  5. Set any additional options you require in the New Breakpoint dialog and click OK.

    The IDE creates the new breakpoint for the selected source element.

To modify an existing breakpoint:

  1. Choose Windows > Debugging > Breakpoints (Alt-Shift-5) to open the Breakpoints window.
  2. Right-click any breakpoint and choose Customize to open the Customize Breakpoint dialog box.
  3. Adjust any settings or actions you require and click OK.

    The IDE updates the breakpoint for the selected source element.

To enable and disable a breakpoint:

Notes:

See Also
Breakpoints in the IDE
Setting a Conditional Breakpoint
Organizing Breakpoints Into a Group
About Debugging Java Applications

Legal Notices