views:

496

answers:

12

Are there any books on debugging techniques? A friend of mine is learning to code and he asked me this question. I told him I don't know of any. Is it that you just have to go through the School of Hard Knocks to learn?

+1  A: 

Check this list on amazon.

Vadim
+5  A: 

This is a good high-level overview of how to debug: Debugging, by David J Agans.

See also: Debugging Rules (web site related to book).

RichieHindle
+4  A: 

These two books have chapters on debugging, not deeply covered but very useful:

Code Complete 2 : A Practical Handbook of Software Construction

The Pragmatic Programmer : From Journeyman to Master

Canavar
+2  A: 

I don't think that you can really learn general debugging by a book. Of course there are a few key concepts that you should follow but in each problem domain different techniques apply.

If your friend works in a special problem domain (like developing JEE-applications using Eclipse) then a book that specializes in that particular domain would be suitable.

Apart from that you can just follow general advice like in the books mentioned by Canavar.

Benedikt Eger
+4  A: 

I have been told that Debugging Applications for .Net is very good, but have not actually read it. You don't say which platform(s) you are looking at but obviosly this is .Net specific.

Steve Haigh
I've read an old version of this book, and it did cover basic debugging techniques in addition to Windows-specific methods. Can't vouch for the most recent version, but back when I was a newbie, that book helped me a lot.
Kena
+2  A: 

You can recommend this link also to your friend: Debugging techniques

(Though it's not a book but contains useful tips from SO members)

aJ
+1  A: 

Obivously success in debugging comes with experience. However, you have to give yourself the right tools to be successful. I would suggest learning about all the various tools available for whatever kind of programming your friend is interested in.

To that end, the single greatest book I have read is Advanced Windows Debugging by Hewardt & Pravat. It introduced me to tools I had no idea existed, even after coding for well over 10 years.

pj4533
+2  A: 

I second Steve Haigh's recommendation of Debugging Applications for .NET. I'd recommend anything written by the book's author John Robbins. Robbins has made a career of being a debugging consultant. His books have great war stories of how he saved projects by fixing bugs that no one else could find.

John D. Cook
+1  A: 

If you friend is using c, objective-c or c++, gdb has excellent documentation here:

http://www.gnu.org/software/gdb/documentation/

There is a book here: http://shop.fsf.org/product/debugging-gdb-gnu-source-level-debugger/

Alex
+1  A: 

'Debugging by Thinking' is probably worth a look too. From the site blurb:

Debugging by Thinking: A Multi-Disciplinary Approach is the first book to apply the wisdom of six disciplines -- logic, mathematics, psychology, safety analysis, computer science, and engineering -- to the problem of debugging. It uses the methods of literary detectives such as Sherlock Holmes, the techniques of mathematical problem solving, the results of research into the cognitive psychology of human error, the root cause analyses of safety experts, the compiler analyses of computer science, and the processes of modern engineering to define a systematic approach to identifying and correcting software errors.

Danielb
+1  A: 

I saw that this has been answered, but nobody brought up Why Programs Fail.

WHY PROGRAMS FAIL is a book about bugs in computer programs, how to reproduce them, how to find them, and how to fix them such that they do not occur anymore. This book teaches a number of techniques that allow you to debug any program in a systematic, and sometimes even elegant way. Moreover, the techniques can widely be automated, which allows you to let your computer do most of the debugging.

From the DDJ review:

There are a lot of things to like in this book: the clarity, the references, the “How To” markers and end-of-chapters summaries. What I enjoyed most, though, was the feeling I got of watching over Zeller’s shoulder as he sorts through the jumble of parts on his workbench, sorting things into categories and figuring out how they all fit together.

Suppressingfire
+1  A: 

The book titled "The Developer's Guide to Debugging" by T. Grötker, U. Holtmann, H. Keding, M. Wloka covers a wide range of topics.

TOC: 1. You Write Software: You have Bugs 2. A Systematic Approach to Debugging 3. Source Code Debuggers 4. Fixing Memory Problems 5. Profiling Memory Use 6. Solving Performance Problems 7. Debugging Parallel Programs 8. Finding Environment and Compiler Problems 9. Dealing with Linking Problems 10. Advanced Debugging 11. Writing Debuggable Code 12. How Static Checking Can Help

iceman