Visual studios 2010 debugger variable doesn't update

Started by
16 comments, last by LAURENT* 7 years, 6 months ago

Can you restart VS and do a clean + rebuild all?

Edit: Things like this tend to happen when builds fail and you run an old executable or something. Also, if you have an antivirus solution, check if it has any issues with your program.

Advertisement

Is it possible that you've altered the compile settings?

In any case, if you have and output stream or a logger maybe try logging the value to try and gather more information.

If we could see the larger context we could probably have a lot more insight into what's going on.

void hurrrrrrrr() {__asm sub [ebp+4],5;}

There are ten kinds of people in this world: those who understand binary and those who don't.

Can you restart VS and do a clean + rebuild all?

Edit: Things like this tend to happen when builds fail and you run an old executable or something. Also, if you have an antivirus solution, check if it has any issues with your program.

Nothing so far

Is it possible that you've altered the compile settings?

In any case, if you have and output stream or a logger maybe try logging the value to try and gather more information.

If we could see the larger context we could probably have a lot more insight into what's going on.

I faintly remember accidentally clicking something a while ago. I wasn't paying attention and I never actually figure out what I clicked. How do I log the values?

Is Total_Objects a local, a member variable or a global? Are you using the Locals view, the Auto view or explicit watches when you say the value doesn't update? Or are you hovering it?

Do you ever set Total_Objects to -1, at any place in your code? Do you explicitly set it to something else, like 0? You say this happens with all new variables, do all of them get the value -1?

It seems something is up with your debug project settings..

Is the value black or red? Vs will set values to red when it knows that the value may be out of date... However, I have only seen this happen when showing the value of indexers.

Did you try deleting the watch and adding a new one?

Is there any possibility that the variable name is shadowing another variable by the same name in a parent object?

If you add an arbitrary variable in the same scope as the loop does that value update correctly?

Have you tried closing visual studio, deleting the Obj/bin directories and deleting the .sou file?

That thing that you accidentally clicked might have been something on the "project is out of date, do you want to compile it?" dialog. If that is set to 'never', you could be running an old version of your EXE which doesn't contain any of the new variables you've been adding.

I recommend finding the following setting and making sure it's set to Always Build. If you accidentally changed it to Never Build, then this could be causing some of your problems.

Tools -> Options -> Projects and Solutions -> Build and Run -> On Run, when projects are out of date: --> Always Build

(Counting questions while waiting for larger context or sudden "I figured it out" post.)

void hurrrrrrrr() {__asm sub [ebp+4],5;}

There are ten kinds of people in this world: those who understand binary and those who don't.

That thing that you accidentally clicked might have been something on the "project is out of date, do you want to compile it?" dialog. If that is set to 'never', you could be running an old version of your EXE which doesn't contain any of the new variables you've been adding.

I recommend finding the following setting and making sure it's set to Always Build. If you accidentally changed it to Never Build, then this could be causing some of your problems.

Tools -> Options -> Projects and Solutions -> Build and Run -> On Run, when projects are out of date: --> Always Build

It seem it's already set like that.

(Counting questions while waiting for larger context or sudden "I figured it out" post.)

Larger context.

I am getting the error CXX0017 when I try to watch variables. Something called a pdb file is responsible this. I have no idea what it is or where it is. Anyways now that more context has been provided anyone know a fix for the "CXX0017: Error: symbol not found in static library"?

https://social.msdn.microsoft.com/Forums/vstudio/en-US/8d1007d4-c85a-44e8-970a-1c2a7b638ce4/symbols-are-loaded-but-still-gets-cxx0017-error-symbol-not-found-visual-studio-2010?forum=vsdebug

EDIT:

And now here comes the sudden "I figured it out post.". These files with the extension typed called pdb are used for debugging. Apparently I had an outdated version of this file so only a certain few variables were capable of showing me their status. Deleting and rebuilding it fixed the problem. Previously rebuilding didn't do anything. Thanks for the clues, I was expecting a challenge. :)

This topic is closed to new replies.

Advertisement