Home > Articles > Programming > Java

  • Print
  • + Share This
This chapter is from the book

Managing Breakpoints

You can use the Breakpoints window, shown in Figure 5-5, to manage breakpoints in one place. You can put breakpoints in groups, temporarily disable breakpoints, and provide customizations to the breakpoints from this window. To open the Breakpoints window, choose Window | Debugging | Breakpoints or press Alt-Shift-5.

05fig05.gif

Figure 5-5 Breakpoints window

Grouping Related Breakpoints

In some cases, you might have several related breakpoints that you would like to be able to enable, disable, or delete together. Or maybe you merely want to consolidate some breakpoints under one node to make the Breakpoints window less cluttered.

To group some breakpoints:

  1. Open the Breakpoints window by choosing Window | Debugging | Breakpoints (Alt-Shift-5).
  2. Shift-click or Ctrl-click to select the breakpoints that you want to group. Then right-click the selection and choose Set Group Name.
  3. The breakpoints are grouped under an expandable node.

Enabling and Disabling Breakpoints

You might find it useful to keep breakpoints set throughout your application, but you might not want to have all of the breakpoints active at all times. If this is the case, you can disable a breakpoint or breakpoint group and preserve it for later use.

To disable a breakpoint or breakpoint group:

  1. Open the Breakpoints window by choosing Window | Debugging | Breakpoints (Alt-Shift-5).
  2. In the Breakpoints window, right-click the breakpoint or breakpoint group and choose Disable.

Deleting a Breakpoint

To delete a line breakpoint, click the left margin of the line that has the breakpoint or click in the line and press Ctrl-F8.

To delete another type of breakpoint:

  1. Open the Breakpoints window by choosing Window | Debugging | Breakpoints (Alt-Shift-5).
  2. In the Breakpoints window, right-click the breakpoint and choose Delete.
  • + Share This
  • 🔖 Save To Your Account