Share via


Viewing and Enabling Breakpoints

Home Page (Debugger)OverviewHow Do I... Topics

If you set more than one location breakpoint on a line, and some breakpoints are disabled while others are enabled, a gray dot appears in the left margin in the Source window, Disassembly window, and/or Call Stack window (not the Breakpoints dialog). The first time you click the Enable/Disable Breakpoint toolbar button, all breakpoints on the line become disabled, and the gray dot changes to a hollow circle. If you click the Enable/Disable Breakpoint button again, all breakpoints on the line become enabled, and the hollow circle changes to a red dot.

An asterisk (*) in the breakpoint check box indicates that the breakpoint is not supported on the current platform.

What do you want to do?

View the list of current breakpoints

Disable a breakpoint

Disable all location breakpoints

Enable a breakpoint

Remove a breakpoint

View the source code where a breakpoint is set

To view the list of current breakpoints

  1. On the Edit menu, click Breakpoints.

  2. Use the scroll bar to move up or down the Breakpoints list.

To disable a breakpoint

  1. For a location breakpoint in a source code window, or in the Call Stack or Disassembly window, move the insertion point to the line containing the breakpoint you want to disable.

  2. Click the Enable/Disable Breakpoint toolbar button, or click the right mouse button, and choose Disable Breakpoint from the shortcut menu.

– or –

  1. For any breakpoint in the Breakpoints dialog box, find the breakpoint in the Breakpoints list.

  2. Clear the check box corresponding to the breakpoint that you want to disable.

  3. Click OK.

    For a location breakpoint, the red dot in the left margin changes to a hollow circle.

Tip   You can also use the SPACEBAR to toggle the state of one or more breakpoints in the Breakpoints list.

To disable all location breakpoints

  • Click the Disable All Breakpoints toolbar button.

    The red dots in the left margin change to hollow circles.

To enable a breakpoint

  1. For a location breakpoint, in a source code window, or in the Call Stack or Disassembly window, move the insertion point to the line containing the breakpoint you want to enable.

  2. Click the Enable/Disable Breakpoint toolbar button, or click the right mouse button, and choose Enable Breakpoint from the shortcut menu.

    – or –

  3. In the Breakpoints dialog box, find the breakpoint in the Breakpoints list.

  4. Select the empty check box corresponding to the breakpoint that you want to enable.

  5. Click OK.

    For a location breakpoint, the hollow circle in the left margin changes to a red dot.

Tip   You can also use the SPACEBAR to toggle the state of one or more breakpoints in the Breakpoints list.

To remove a breakpoint

  1. For a location breakpoint in a source window, or in the Call Stack or Disassembly window, move the insertion point to the line containing the breakpoint you want to remove.

  2. Click the Insert/Remove Breakpoint toolbar button, or click the right mouse button, and choose Remove Breakpoint from the shortcut menu.

    – or –

  3. In the Breakpoints dialog box, select one or more breakpoints in the Breakpoints list.

  4. Click the Remove button, or press the DELETE key.

  5. Click OK.

    For a location breakpoint, the red dot in the left margin disappears.

To view the source code where a breakpoint is set

  1. In the Breakpoints list, select a location breakpoint.

  2. Click the Edit Code button.

This action takes you to the source code for a breakpoint set at a line number or function name. In the case of function names, the debugger must be running for this to work.