Debugging Checklist

The classic "print-statement-debugging" techniques may work for simpler cases, but quickly get unmanageable. The checklist below is an effective way to find and fix bugs.

  1. Observe the bug

    "What makes me think there is a problem?"

  2. Create a reproducible input

    "How can I reliably reproduce this problem?"

  3. Narrow the search space

    "How can I narrow down to the code that could cause this problem?"

  4. Analyze

    "What information can I gather from this identified code?"

  5. Devise and run experiments

    "How can I check my hypotheses about the issue?"

  6. Modify code to squash the bug

    "How can I fix the issue, and confirm that the fix works?"

Additional Tips

View Source