Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2015 Debugging: Can't expand local variables?

I'm using Visual Studio 2015 preview, and I'm trying to debug my project. I was using VS 2012 previously, and depended largely on being able to hover over and expand local variables to look at their values. I'm trying to do this in 2015 now, but when I hover over a variable, the box that shows up only says "(local variable) Classname variablename" (e.g. "(local variable) String title"). There is no expand button, and it doesn't show the value of the variable in the box.

Is there a setting I have to change in order to be able to hover over variables and expand them?

like image 754
Erica Stockwell-Alpert Avatar asked Feb 25 '15 21:02

Erica Stockwell-Alpert


People also ask

How do I show local variables in debugging?

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.

How do I enable locals in Visual Studio?

To open the Locals window, while debugging, select Debug > Windows > Locals, or press Alt+4. This topic applies to Visual Studio on Windows.


1 Answers

It might be a bug. Please file a Connect bug with a repro if you have one.

In the meantime, you might be able to workaround the problem by setting the debugger options to use the legacy debug engine: Tools -> Options -> Debugging -> General: check both "Use the legacy C# and VB expression evaluators" and "Use Managed Compatibility Mode".

That workaround has worked for me every time. But please, do still file the bugs!

Options window

like image 133
Andrew Arnott Avatar answered Oct 12 '22 11:10

Andrew Arnott