Sign in to follow this  

debugging in vs2008- globals

This topic is 3593 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I know how to find the values of local varibles that existed at the point where I stoped the program, but how can I see the value of the global varibles? The only window I can find under debug is for locals...

Share this post


Link to post
Share on other sites
As DrEvil says. You can watch all your variables in the WATCH window and that's the best way to check on how your code is actually working. Use breakpoints then step through the code at the point the variables are used.

Or write debug code into the application (you can always take it out later) that either runs it's own debug console window or simply prints variable values to screen as they change. I do this a lot with vector buffers because they only exist in memory so are hard to step through with a debugger line by line.

If you have a loop with a large array or something and it would take years to step through it just print to screen each time through the loop and put a short Sleep(500) in it so you get to quickly read what the values are before the screen updates or scrolls or whatever.

m0ng00se

Share this post


Link to post
Share on other sites

This topic is 3593 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this