问题描述
当我调试我的ASP.NET网站代码使用Microsoft调试符号的.NET ..我继续得到这个愚蠢的'结果'为大多数变量,当我调试.NET框架代码(当然是由Microsoft Symbol Server提供,我告诉VS2008获取信息,从) 无法获取本地或参数的值 cookie'as
它不可用在这个指令指针,可能是因为
它被优化了。
这就像我使用的代码是使用优化的编译代码。如果是这样,我可以告诉它不要优化吗?我正在进行DEBUG配置。这是非常令人沮丧的,因为我无法调试..因为我看不到/检索本地变量的值,当我通过代码。
任何线索/想法? / p>
Shawn Burke描述了一种在他的。
首先,创建一个CMD,加载Visual Studio而不进行JIT优化。
set COMPLUS_ZapDisable = 1
cd / d%ProgramFiles%\Microsoft Visual Studio 9.0\Common7\ide\
start devenv.exe
exit
在Visual Studio项目中执行以下步骤:
1)右键单击项目文件并选择属性
2)选择调试选项卡,取消选中启用Visual Studio托管进程 / p>
3)在调试器中启动应用程序。
When I debug my ASP.NET web site code using the Microsoft debug symbol's for .NET .. I keep getting this silly 'result' for most of the variables when I'm debugging .NET framework code (which of course is provided by the Microsoft Symbol Server, which I told VS2008 to grab the info, from)
Cannot obtain value of local or argument 'cookie' as
it is not available at this instruction pointer, possibly because
it has been optimized away.
It's like the code I'm using is using optimized, compiled code. If that's the case, can I tell it NOT to optimize? I'm in DEBUG configuration. It's very frustrating because I cannot debug .. cause I can't see/retrieve the values of local variables as I step through the code.
Any clues/thoughts?
Shawn Burke described a method of disabling this on his blog.
First, create a CMD that'll load Visual Studio without JIT optimization.
set COMPLUS_ZapDisable=1
cd /d "%ProgramFiles%\Microsoft Visual Studio 9.0\Common7\ide\"
start devenv.exe
exit
Once in your Visual Studio project, do the following steps:
1) Right click on your project file and choose "Properties"
2) Choose the "Debug" tab and uncheck "Enable the Visual Studio Hosting Process"
3) Launch your application in the debugger.
这篇关于使用MS的Symbol Server调试.NET代码 - VS不显示变量的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!