Are debuggers obselete?

Are debuggers still useful? The main use of GNU debugger (gdb), for me, is to make sure I get a stack trace, like in Java. Putting break points and watching variables is just not something I do outside the code. Putting asserts and various checks in the code is far more valuable in my opinion even if it “dirties” (to dirty) the code.

One issue you must not forget about debuggers, is that once your code is deployed, you no longer have a debugger running on your client’s machine. Even if you don’t release your code, others might have to use it, and they may have trouble with it… What is worse is that some nasty problems only occur outside the debugger. I’ve never seen this happen under Linux, but I have seen i happen again and again under Windows. Also, consider that most modern applications are web applications. Of course, you can run a web application in “debugging” mode, but it is quite the same as web applications tend to be distributed (web server, database, etc.). I think you need to learn to debug applications live.

I will also add that it is well known that the Linux kernel is built is C with printf statements. If you can build something so complex without a debugger, using a nasty language like C… then debuggers are not so useful.

What I find tremendously useful are unit tests. We never have enough unit testing. And I don’t think it is stressed enough in the curriculum. If there is one thing you must learn from modern software engineering, it is not UML, it is not business processes, it is unit testing.

3 thoughts on “Are debuggers obselete?”

  1. Yes, this is supposed to be an highly-commented-on controversial topic. I agree with your analysis regarding debuggers.

    Regarding embedded applications versus web applications, do you really think there are more distinct embedded applications than web applications?

  2. Is this supposed to be a highly-commented-on controversial topic, or one that helps people? :^)

    I must admit, sheepishly, that I’ve always been too lazy to learn to use a debugger and still rely on printf or the equivalent. Often, determine that the bug is more than 100,000 iterations into a 1,000,000 iteration loop; do any debuggers provide breakpoints that only trigger after being passed through n times? A binary search through the loop iterations is a fairly quick thing to do with a test and printf.

    “…most modern applications are web applications.”

    Now you’re really just pandering for comments! Everyone knows most applications are embedded.

  3. I find the rbreak command of the gdb useful for understanding how modules are used in large programs. Suppose that all functions exported by module A starts with A_xxx, then setting rbreak ^A_.* and running the program gives us a clue how the module A is used.

Leave a Reply

Your email address will not be published. Required fields are marked *

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    Markdown is turned off in code blocks:
     [This is not a link](

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see