VStudio 2012, Watches don't work for some variables

Hello everyone,

I am trying to debug a C++ program but suddenly the Visual Studio 2012 does not show the values of variables (I am at the red break point in the photo) when I mouse over "some" of the variables (e.g. targetDirection" and nextPIndex).

In addition if I add a watch for these variables, it says the variables are undefined! (even though they are in current debugging scope)

Anyone knows what's wrong?

Thank you

P.S: The snapshot (notice the watch I have added and the break point)

Are you debugging a release or debug configuration? A release configuration will have optimizations done that may include getting rid of variables that aren't needed and you won't be able to monitor those variables.
Topic archived. No new replies allowed.