[prev] 24 [next]

The Debugging Process (cont)

The real difficulty of debugging is locating the bug.

Since a bug is "code with unintended action", you need to know:

  • in detail, what the code should do
  • in detail, what the code actually does
In any non-trivial program, the sheer amount of detail is a problem.

The trick to effective debugging is narrowing the focus of attention.

That is, employ a search strategy that enables you to zoom in on the bug.