Navaneeth K N
Navaneeth K N

Reputation: 15501

Quick watch window not showing the variable value in Visual Studio for C++/CLI project

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?

Upvotes: 5

Views: 14120

Answers (4)

Johan Wikström
Johan Wikström

Reputation: 921

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!

Upvotes: 5

Dave Coates
Dave Coates

Reputation: 51

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

Upvotes: 0

Johan Wikström
Johan Wikström

Reputation: 921

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.

Upvotes: 1

Assaf Lavie
Assaf Lavie

Reputation: 75983

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

Upvotes: 2

Related Questions