5.2 Setting and Removing Breakpoints


To locate logic errors in your program, you can step through your code by pausing execution at breakpoints and checking the values of variables.

To Set a Breakpoint:

or

You can set breakpoints in both debugging and non-debugging mode. After setting a breakpoint, a red circle displays in the left margin next to the line of code.

Note: The Enable Breakpoints button Button Enable Breakpoints 90.png on the Debug toolbar and the Debug:Enable Breakpoints menu command turn debug mode on or off. For more information, see Starting the Debugger.


Set Breakpoint 91.png


To Remove a Breakpoint:

or

You can remove breakpoints in both debug and non-debug mode.

To Remove all Breakpoints: