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.