Debugger in Dev-C++

Mar 10, 2009 at 5:33pm
Maybe a stupid question, but I don't know how to use a debugger. I use Dev-C++ (outdated, I know), and there is a debugger in it, but how should I use it?
I don't see really see the reason for a debugger, except when it comes to memory leaks and that sort of stuff (that's why I'm asking this).
There're probably some good explanations available on the web, but I can't find them. If someone could help me out with a good explanation or a link about how and why to use a debugger, that would be great.
Mar 10, 2009 at 5:44pm
A debugger is a critical development tool that every good programmer absolutely must learn how to use. In some cases it can be used as a learning tool when you are not sure how the code works. When you open up the code in a debugger you can view interlaced assembly to see the assembly and c++ code together. You can step through a program line by line to ensure that it is executing the way you expect which is very helpful when the program produces unexpected output. Memory leaks are just the tip of the iceberg. There are many many uses for the debugger. It isn't just for "finding bugs". If your IDE has a debugger I am sure there must be a help menu or some form of documentation. Start reading it until you learn how to use it.
Mar 11, 2009 at 9:08pm
Thanks for the reply.

The Dev-C++ reference on the debugger is really incomplete, or at least not well ordered. Anyways, I couldn't get much out of it.

I played around a bit with the debugger, and I now understand how to pause the program at a breakpoint and watch values of variables, wich is pretty much the first part of the debugger. The second tap, "backtrace", shows the functions and arguments in wich the breakpoints are, if I understanded right. The third tap, "output", has something to do with GDB, wich is "the GNU Project debugger". It shows a lot of stuff, from wich I don't understand much. Do you recommend to learn about GDB?
Topic archived. No new replies allowed.