Jump to content
  • Advertisement
Sign in to follow this  
Sync Views

debugging in vs2008- globals

This topic is 3807 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
Advertisement
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
When you break into debugging, just hold your cursor over any variable and you'll get its value.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!