Sherlock Holmes Debugging

“How often have I said to you that when you have eliminated the impossible, whatever remains, however improbable, must be the truth?”
― Arthur Conan Doyle, [The Sign of Four]

Debugging hardware or software problems is often a challenging exercise because you can’t see what is going on for many reasons. Some of them include:

  1. There are millions of lines of code running and you can’t understand or single step through all of them.
  2. You can’t see what is going on inside integrated circuits or complex PCB boards.
  3. Modern systems have many things happening concurrently, and sometimes it is the interaction of these where the problem lies.
  4. Modern computer systems run very fast.
  5. Humans tend to overlook the simple, obvious solutions.

When faced with debugging a problem in a complex system, it helps to narrow the scope of the problem. If possible, test things in isolation. Eliminate one option at a time until you are left with a limited subset of possibilities. What is left is likely the problem.

1 Like