I read and studied a lot of computer science and engineering and I rarely or never seen a book about debugging or a theory how to debug (though I surely developed some debugging theories of my own).
Are there any debugging theories and/or books? Why / why not? I can read how to debug using gdb and some of the most useful info about development I got from reading how to use gdb.
7
I read the Debug IT from Pragmatic programmers. As almost all books from pragmatic programmers, it’s pretty hands-on but not so deep, but was nice to help me to teach new developers how to set their “debug mindset”. There are no black magic, but more common sense and almost everything looks really intuitive for experienced programmers.
There is Debugging: The 9 Indispensable Rules for Finding Even the Most Elusive Software and Hardware Problems. I don’t remember it to be terribly deep or at all academic, but it certainly has some interesting insights and stories.
It’s also very useful to see debugging from the hardware perspective–generally, debugging hardware is more difficult than debugging software. Each chapter of the book is motivated by a “war story” from the author’s experience; the rest of the chapter goes over what technique he found useful in that particular case. The stories are a nice mix of both hardware and software development.
I certainly found the approach of starting each chapter with a real-life story very instructive.
2
The Saff Squeeze is a technique described by Kent Beck which uses tests and refactoring for debugging:
Hit ’em High, Hit ’em Low:
Regression Testing and the Saff Squeeze
Kent Beck, Three Rivers Institute
Abstract: To effectively isolate a defect, start with a system-level test and progressively inline and prune until you have the smallest possible test that demonstrates the defect.