tisdag 30 mars 2010

Cannot obtain value of local or argument as it is not available at this instruction pointer, possibly because it has been optimized away.

Ever seen this during debug and ripped your hair on how to see the locals again?


I was working in a project where we during last bug fix sprint encountered problems debugging our code. For most, if not all, locals we wanted to inspect we were shown a message like the above. Turned out there were others having stumbled with similar issues such as Scott Hanselman and Kirill Osenkov.


Unfortunately none of their suggestions worked in our case where we were having those issues for a web site project. Eventually we found the cause being the web site project’s advanced build settings being set to .pdb only as in the screen show below:


So, for us it worked like a charm again after right clicking the web site project, selecting Properties, Build, Advanced and changing Debug info to Full.


Hope this helps someone else out there!

Inga kommentarer:

Skicka en kommentar