5

I know that Visual Studio support for C++/CLI is terrible. But I am getting a weird issue when doing a Quick watch. The variable which I am watching is in the scope and it has value. But VS says, the variable is not in the scope. See the image

Quick watch problem in C==/CLI http://www.freeimagehosting.net/uploads/95471b8cb4.png

It would be great if someone can suggest a workaround. Or is this a bug with VS?

Deduplicator
  • 44,692
  • 7
  • 66
  • 118
Navaneeth K N
  • 15,295
  • 38
  • 126
  • 184

4 Answers4

5

I actually made it work by these steps, not sure why this should be the solution though.

  1. checking enabling .net source stepping and enable source server. http://tinypic.com/view.php?pic=987ubn&s=3#.WAM_D5MrK8o
  2. it then loaded all symbols
  3. made a clean build, removed it again and enabled just my code
  4. clean build, voila i got correct debug symbols again!
Pierre Arlaud
  • 4,040
  • 3
  • 28
  • 42
Johan Wikström
  • 921
  • 8
  • 18
  • image does not exist anymore – JobaDiniz Mar 21 '16 at 13:19
  • I know like this is 11 years later, but I've got involved with some legacy work on VS2008. Suddenly, I couldn't see the values of some global arrays. I set Enable .NET FW source stepping and also Enable source server support. It downloaded symbols for the .NET libraries and now I can watch my globals again. Re-enabling "Enable Just My Code" screwed it up again. – Nick Apr 09 '20 at 21:21
2

Is this in Debug or Release? Release builds, even with PDB support, are notorious for poor watches.

Assaf Lavie
  • 73,079
  • 34
  • 148
  • 203
1

I got the exact same problem. Its in debug mode, ONLY on websites, other projects (console, webapplications) are fine. I use c#, Visual Studio 2008, asp.net 3.5 SP1.

I also get strange types in the locals window.

Johan Wikström
  • 921
  • 8
  • 18
0

Refer to this article -> Out Of Context Variables In Visual Studio 2010 Debugger

This seems to be a PostSharp bug that's fixable using the latest release

Community
  • 1
  • 1