Variable in watch list

Hello,

I am debugging my code and adding a variable in the watch list but I cant see the detail. I think it is because of my variable. My variable is Var::m_Id. Can't I see the details of this variable? Or else how?
Which is your IDE?
Is Var::m_Id static?
Last edited on
I am using Visual Studio 2008.

it is not static variable. I declared my variables in the namespace like that,

namespace PicDraw
{
bool me;
int x;
int y;
}

Whenever I want to use PicDraw::x, I can use but whenever I add this variable into my watch list, it says "PicDraw::x error: symbol 'PicDraw::x' not found ". If I use classes instead of namespaces, I can see theequation. What is the problem?

Are you shure to be in Debug mode?
Yes I am quite sure to be in Debug mode. You can have a look at my screen. I will upload a picture. Thanks for help.

http://i40.tinypic.com/2aalctl.png
(The Debug/Release mode is shown on the top of the screen)
On my VC++ (2008) Express I can watch for all namespace variables in Debug mode and all initialized namespace variables in Release mode.
If I try to watch the value of an uninitialized namespace variable on the Release mode I get your same error message.

Using as example the namespace you posted:
http://i42.tinypic.com/nns4lf.jpg
Last edited on
This is fairly obvious but I've made this mistake more than once so I'd like to point it out: are you sure you are looking at the "Watch" tab and not the "Autos" or "Locals" tab? They all look fairly similar.
Mmn, the thing is that namespace variables are initialised to zero (unless otherwise specified) before the program starts - so technically it's
not an uninitilisation problem.
It's probably just a lack of debugger symbolic information?
Last edited on
Topic archived. No new replies allowed.