且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Visual Studio 2015调试:无法扩展局部变量?

更新时间:2023-02-22 18:26:28

这可能是一个错误。


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?

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!