How to watch all variables when debugging in Visual Studio 2012

Dobrobobr picture Dobrobobr · Dec 5, 2013 · Viewed 71.2k times · Source

Is there a way to watch all variables when debugging in Visual Studio 2012 like i can do it in IntelliJ Idea 12? I have a window with all the variables(both global and local) when debugging in Idea and i want the same thing in VS 2012 (Autos window is not enough) . Help is very much appreciated. EDIT: All variables means variables that were already declared in code like:

Class Example
  Dim i as Integer
  Sub test()
   Dim a as String
   Dim b as Double
  End Sub
End Class

When I enter test() Autos window no longer displays i.

Answer

Marco Medrano picture Marco Medrano · Dec 5, 2013

Many options:

  1. Autos While debugging you can enable 'Autos' which will show you values by every member on your class. Go to menu Debug->Windows->Autos to make it appear.

  2. Locals While debugging you can enable 'Locals' which will show you all variables in the current stack frame. Go to menu Debug->Windows->Locals to make it appear.

  3. Watch Although it is a little manually you also can use 'Watch' you can drag and drop any variable to this window or right click then add to watch. Go to menu Debug->Windows->Watch to make it appear. Note. You can enable more than one watch window :).

  4. Mouse over Finally you can go over the variable with the mouse and you will see the variable's value.