views:

57

answers:

3

Seeing an issue when debugging in Visual Studio. All of the values under watch, and in the hover over window show up incorrectly. the only values that show properly, are values that are local to the method I am currently stepping through.

For example the watch value for 'this' when debugging shows the following under value

0x00000000ffac0388 { btnBack=0x00000000ffaccf20 btnReply=0x00000000ffacd200 btnForward=0x00000000ffacd420...}

some other variables show this, even though the variable is there.

 error: 'this.foo' does not exist

The machine recently had windows 7 64 installed, since then this problem has occured. Visual studio has been reinstalled on this machine, and we verified that the settings in visual studio were exactly the same as a different PC that is the same machine and config.

A: 

Can you provide a bit more information to help us track down this problem. In particular

  • What operating system was installed before upgrading to Windows 7 64 bit?
  • Did you install Visual Studio before or after the upgrade?
  • Is there any other version of Visual Studio installed on the machine?
  • If you set your application to be x86 specific does the problem still repro?
  • What language is your code written in (assuming C#)?
JaredPar
A: 

When facing weird debugging issues, I find that deleting the solutions User Options file (.suo) usually fixes the problem. You will loose your bookmarks, breakpoints, any special exception handling, and so on.

If that fails then clear all your Visual Studio "temporary" files. Check out the "Clear Recent" script at http://missico.spaces.live.com/blog/cns!7178D2C79BA0A7E3!370.entry. Modify it for your own needs. For instance, I dislike Flash, so you may want to remove the call to ClearStupidFlash and the other non-Visual Studio calls. Clear your solution then "rebuild all".

If the problem still exists, then something else is going on.

AMissico
+1  A: 

We finally figured out what the issue was. The devenv.exe was being set to run in xp compatibility mode (sp3). Doing a rebuild of the project after removing the compatibility mode fixed the issue.

Aaron M