David J. Agans' Debugging was just reviewed over on Slashdot. The book has nine debugging “rules“:

  1. Understand the system
  2. Make it fail
  3. Quit thinking and look
  4. Divide and conquer
  5. Change one thing at a time
  6. Keep an audit trail
  7. Check the plug
  8. Get a fresh view
  9. If you didn't fix it, it ain't fixed

Three and five are rules most people have in the back of their heads but don't follow most of the time. Six is a great suggestion most people have probably never considered. But by far, of course, the most important of all these is number one: Understand the system. Without that you've got nothing. :0)

What's your most useful debugging technique/insight?

Here's a great snippet from the comments: “Teaching people how to debug isn't that easy. It requires some experience before they get the hang of it.” (pcraven)