How to: Use Variable Windows

How to: Use Variable Windows


The Visual Studio debugger provides several windows, collectively known as variable windows, for displaying variable information while you are debugging.

Each variable window has a grid with three columns: Name, Value, and Type. The Name column shows the names of variables added automatically in the Auto and Locals windows.

In the Watch window, the Name column is where you can add your own variables or expressions. See Watch an Expression in the Debugger for instructions.

The Value and Type columns display the value and data type of the corresponding variable or expression result.

You can edit the value of a variable in the Value column. For instructions, see How to: Edit a Value in a Variable Window.

To display a variable window

  • On the Debug menu, choose Windows, then choose the name of the variable window you want to display (Autos, Locals, Watch, or Watch1 through Watch4).

    You cannot access these menu items or display these windows in design mode. To display these menu items, the debugger must be running or in break mode.

    The Autos window does not support F# debugging.

© 2015 Microsoft