Debugging is search through a state space. The space is huge, and most of it is irrelevant.

Good debuggers are good at pruning:

  • Bisect: cut the space in half each step (git bisect, binary search through commits)
  • Minimize: shrink the input until the bug disappears, then bring it back one piece at a time
  • Doubt everything: the bug is rarely where you first looked

The worst debugging move: re-reading the same code expecting it to look different.