Sign in to follow this  
NUCLEAR RABBIT

Debugging

Recommended Posts

Hello, I've been reading many threads where people obsess over how great the debugger is with VC++ Express 8, The fact is, I do not have any clue as to how to learn to use it. From what Im assuming they mean is to read the error messages after trying to compile? Anyways, if anyone could throw some useful tips at me having to do with VC++ Express 8, i would greatly appreciate it [smile] P.S : I Graduated Today! [lol]

Share this post


Link to post
Share on other sites
I haven't used the debugger much lately, but it has been a really big help for me before when I've had a big program with lots of values running around and wanted to know why they are not doing what I want them to.

You can probably follow Dave's advice and just hack away at the F10 and F11 keys till you get something. :)
I know I happened to find it by chance just messing around with the program and it's proved to be an invaluable tool. Also, when using it look for a window named "Autos" that window represents your variables and their values.

Quote:
Original post by NUCLEAR RABBIT
From what Im assuming they mean is to read the error messages after trying to compile?


I think those error messages are from your compiler not the debugger.

-Manny

Share this post


Link to post
Share on other sites
Basic use of the debugger:

You know you are getting a wrong value somewhere in your code and you have the area pinned down to ~40 lines in a function.

Set a breakpoint at the top of those lines.

Run with the debugger and it will pause there so you can see the values of the variables.

Then use the various "stepping" methods to see exactly what your code is doing. Suddenly an if-statement did the wrong thing, and you found your bug!

After finding such a bug, I recommend ripping off its legs and deep frying them.

Share this post


Link to post
Share on other sites

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