Enabling and disabling breakpoints

Rather than deleting a breakpoint, you can disable it so that it does not stop program execution. When a breakpoint is enabled, it will cause all threads to suspend whenever it is hit. When a breakpoint is disabled, it will not cause threads to suspend. Breakpoints can be added, deleted, enabled, or disabled while your application is running.

About this task

When you disable a breakpoint, it remains in the Breakpoints view. To have your program stop on a breakpoint that you have disabled, select and enable it. The advantage of disabling a breakpoint instead of deleting it is that you do not have to find the location in the source to set the breakpoint again. In addition, a disabled breakpoint saves any extra settings in the breakpoint.

There are two indicators to the left of a set breakpoint. To the far left is a check box indicating whether the breakpoint is enabled. Enabled breakpoints are indicated with a check mark in this check box, while disabled breakpoints are indicated with no check mark in the check box. When a breakpoint is disabled, you can choose Enable from its pop-up menu in the Breakpoints view or editor (where the menu item is Enable Breakpoint). When a breakpoint is enabled, you can choose Disable from its pop-up menu.

Enabling and Disabling Breakpoints from the Breakpoints View

To enable or disable a single breakpoint from the Breakpoints view:

Procedure

  1. Click on the Breakpoints view to bring it to the foreground.
  2. Scroll the list of breakpoints until you see the breakpoint you want to enable or disable. If you want to enable or disable multiple breakpoints, select them using the keyboard Shift or Ctrl keys.
  3. Perform one of the following:
    • To enable or disable a breakpoint, use the check box to the far left of the breakpoint. To enable a breakpoint, select the check box. To disable a breakpoint, clear the check box.
    • Right-click the breakpoint you want to enable or disable and select Enable or Disable.

Enabling and Disabling Breakpoints from the Editor

To enable or disable a single breakpoint from the editor:

Procedure

  1. Locate the breakpoint in the editor.
  2. Perform one of the following tasks:
    • Right-click the breakpoint indicator in the editor ruler bar and select Enable Breakpoint or Disable Breakpoint.
    • Right click the breakpoint in the editor and select Enable Breakpoint or Disable Breakpoint from the pop-up menu.
    The editor breakpoint indicator changes to a clear dot, if the breakpoint has been disabled, or a filled dot, if the breakpoint has been enabled.

Disabling all breakpoints

To disable all breakpoints:

Procedure

  1. Click the Skip All Breakpoints toggle button.
    This will temporarily disable all breakpoints.
  2. To re-enable all breakpoints except those that you specifically disabled with the Disable Breakpoint action, click the Skip All Breakpoints toggle button again.