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 that you might have made to the breakpoint.

There are two indicators to the left of a set breakpoint. To the far left is a check box which indicates if 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.

You can enable or disable a single breakpoint from the Breakpoints view, as follows:

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 tasks:
    1. Click the check box to the far left of the breakpoint you want to enable or disable. If the check box contains a check mark, the breakpoint is enabled. If it does not contain a check mark, it is disabled.
    2. Right-click on the breakpoint you want to enable or disable and select Enable or Disable from the pop-up menu.

Results

You can enable or disable a single breakpoint from the editor, as follows:

  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 from the pop-up menu.
    • Right click the breakpoint in the editor and select Enable Breakpoint or Disable Breakpoint from the pop-up menu.
  3. 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.

You can also disable all breakpoints. To do this, click the Skip All Breakpoints toggle button. This will temporarily disable all breakpoints. To re-enable all breakpoints (except those that you had specifically disabled with the Disable Breakpoint action), click the Skip All Breakpoints toggle button again to cancel it.


Feedback