Jeff from the SDK team here again. I debug both customer’s code and Windows on a daily basis with WinDBG and other tools. I recently came
across a fantastic book by David J. Agans called Debugging : The 9 Indispensable Rules for Finding Even the Most Elusive Software and
This book doesn’t cover any debugging tools, but rather different ways to think about problems, and how each one can help you be a more
productive problem solver. It offers real world ‘war stories’ from his many years of hardware and software design. It is only 175 pages and can be read in
just a few hours.
The 9 Debugging rules are, with the briefest of paraphrased explanations are:
1) Understand the system – Read the manual, you can’t fix something unless you know how it is supposed to work.
2) Make it fail – I have always used this one, but I called it, “If I can make it worse, I can make it better.
3) Quit Thinking and Look – Don’t just think about the problem, add debugging, hook up a scope, get your hands dirty.
4) Divide and Conquer – Keep dividing the search area in half, make it hard for the bug to hide.
5) Change One Thing at a Time – Don’t try to find bugs with a shotgun, use a rifle instead.
6) Keep an Audit Trail – Keep detailed notes on how you reproduced a bug, it makes it easier on everyone to find it and fix it.
7) Check the Plug – Start at the beginning, don’t just start debugging where you think the bug might be.
8) Get a Fresh View – Run a difficult problem passed a colleague or even your mother. Talking fixes as many problems as the
9) If You Didn’t Fix It, It Ain’t Fixed – You have to understand why your fix resolved the problem. If not, keep looking.
Follow us on Twitter, www.twitter.com/WindowsSDK.