Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Tha_HoodRat

Debugging Methods

This topic is 6418 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

Most compilers come with a debugger , however they scare me , so I never use them . I find bugs the Ol'' fashion way . I dont even know how to use the VC debug (in my 6 years of programming , thats a shame) . How inefficient is the Ol'' way , am I losing anything ? My method works fine , I find bugs just as fast most of the times faster than my collegues . I am just curious as to how the rest of the world does things.

Share this post


Link to post
Share on other sites
Advertisement
I use the debugger. The fact that I can step through the code, line by line, checking each variable affected by every line of code makes it invaluable. Not to mention the fact that I can track register changes, memory address contents, assembly code etc. is also invaluable for tracking bugs.

There are times when I have to use the ''Ol fashion way, particularly when I am running the Release version (debugger is not effective in this mode). That''s when I export variables to a log file, message box etc. to try to track the bugs in release code.


Regards,
Jumpster

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Personally I use the debugger as a last resort. When I just can''t figure out what went wrong or if I need to see that some code is doing what''s expected.

I know a few people who are almost always in the debugger tho. I worry if ever they need to do something when the debuggers not there, will they be able to cope

If you find it just as quick compared to others, I don''t see a problem with that. But I do think you should get a little practice with it. Because it can help. But as I said, I prefer to only move onto the debugger once I''ve exhausted my knowledge of the code.

n!

Share this post


Link to post
Share on other sites
Not to sound stupid, but - what is the old fasioned way?



"Science is a tool. If the tool works, we use it. If it''s true, that''s great, but if it isn''t, it doesn''t matter" -- ("Desert Fox" from GameDev.net)''s physics teacher

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
The old fashioned way is probably scattering printf''s around in your code to output debug info.

A good debugger is an invaluable tool - and the VC debugger is pretty good. You should definitely try to learn to use it.

And the debugger actually works ok in release mode as well. You don''t get debug info by default so you have to turn it on. You won''t necessarily be able to watch variables reliably and you may bounce around a lot while trying to single step but it''s better than nothing.

If you want to be a really good debugger you should learn assembly also. I''ve figured out lots of really wierd problems because I was able to step through the assembly to see exactly what is going on.

-Mike

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!