Enabling and disabling breakpoints
Rather than deleting a breakpoint, you can disable it so that it does not stop program execution. 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.
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, and the Disable menu item is not available. When a breakpoint is enabled, you can choose Disable from its pop-up menu and not Enable.
You can enable or disable breakpoints from the Breakpoints view, as follows:
Click on the Breakpoints view to bring it to the foreground. Scroll the list of breakpoints until you see the breakpoint you want to enable or disable. If you would like to enable or disable multiple breakpoints, select them using the keyboard Shift or Ctrl keys. Do one of the following:
- 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.
- Right-click on the breakpoint you want to enable or disable and select Enable or Disable from the pop-up menu.
- Right-click on the breakpoint you want to enable or disable and select Properties from the pop-up menu and, in the Breakpoint Properties dialog, ensure that the Enabled check box is selected if you want the breakpoint to be enabled. Alternatively, deselect the check box if you want the breakpoint to be disabled. When finished, click OK.
You can also enable or disable a breakpoint in the editor by right-clicking it in the marker bar and choosing Enable or Disable. Alternatively, you can right-click the breakpoint in the marker bar and choose Breakpoint Properties from the pop-up menu. This will open the Breakpoint Properties dialog, in which you can enable or disable the breakpoint, as described above.
To disable all breakpoints, click the Breakpoints view Skip All Breakpoints toggle button. This will temporarily disable all breakpoints. To re-enable all breakpoints (except those that you had specifically disabled via the Disable Breakpoint action), click the Skip All Breakpoints toggle again to cancel it.
Related concepts
Breakpoints
Related tasks
Using breakpoints
Setting a line breakpoint
Removing breakpoints
Editing and viewing source while debugging
Halting a running program