Finding the cause of a failure by reproducing it and running experiments, instead of guessing at fixes.
- Reproduce First
- Making a failure happen on demand, ideally as a failing test, before touching the code.
- Debugging as Experiment
- Forming a hypothesis, predicting what you will see, and running the smallest test that could prove the hypothesis wrong.
- Bisection
- Halving the search space across commits, inputs or configuration until the cause is isolated.
- Reading Stack Traces and Logs
- Extracting where, when and with what data a failure happened.
- Debuggers and Tracing Tools
- Breakpoints, watch expressions and system tracers for seeing what code actually does at run time.
- Root Cause Analysis
- Asking why until you reach a cause you can fix, then fixing the whole class of bug along with the instance.