How to: Debug Code in the Editor

The Code Editor contains a number of advanced features for debugging code, most of which are described in Debugging in Visual Studio. The Code Editor provides visual indicators to alert you to the debugging status; these indicators display to the left of the line in the indicator margin. The following is a list of the most commonly encountered indicators:

Indicator Name




Breakpoint Symbol

Represents a line where a breakpoint (F9) has been set. Program execution is suspended at this point.

Current Statement

Current Statement Pointer Indicator

Represents the next line to be executed. You can drag the current statement indicator to another line to either skip or re-execute code.

Call Return

CallReturnIndicatorSymbol screenshot

Represents the line from which the code was called.

Error List

VisualBasicWinAppProjectTaskListShortcutButton scr

A shortcut connected to the corresponding task item in the Error List.


Temporary Bookmark Symbol

Marks a line of code that you can navigate back to from the Bookmarks Window.


The dialog boxes and menu commands you see might differ from those described in Help depending on your active settings or edition. To change your settings, choose Import and Export Settings on the Tools menu. For more information, see Working with Settings.

When an error occurs in a line of code, it is automatically added to the Error List and to the Output window.

To use the Error List or Output window to find an error in code

  • Double-click the Error List or Output window entry.

Some languages display a wavy line beneath coding errors in the Code Editor. Hover over code marked with a wavy line to display a message describing the error.

See Also


How to: Create Task List Comments


Error List Window

Output Window

Other Resources

Setting Bookmarks in Code