Reputation: 8946
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.
Upvotes: 20
Views: 108553
Reputation: 1
you can select debug-> windows-> watch(click on it) and it will appear in the below of visual studio where output window or others window show. You can type the variable name here like below to explore the objects or variable enter image description here
Upvotes: 0
Reputation: 3040
Many options:
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.
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.
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 :).
Mouse over Finally you can go over the variable with the mouse and you will see the variable's value.
Upvotes: 46
Reputation: 1903
You can move your mouse on a variable and wait for 1 second until a "mini" window appears. What you can see it depends on the code block your breakpoint exist.
Also to display a variable window: http://msdn.microsoft.com/en-us/library/bhawk8xd.aspx
Upvotes: 0