Back to Bug Lab

Defect localization · Hypothesis testing

Bug Detective

Find the bug by reasoning, not guessing. The under-taught skill in programming.

Inspect this small program that does the wrong thing. Find the bug by stepping through what each line actually does and comparing it to what you expected it to do. The discipline this builds — narrowing down where reality and assumption diverge — is what separates good debuggers from people who 'try things' until something works.

Explore the activity to earn its passport stamp. Stamps record exploration, not mastery.

What’s happening under the hood

  • ›Scientific method applied to code: form a hypothesis ('I think X is broken'), test it by inspecting that exact thing, narrow the search space.
  • ›Print debugging is real debugging. So is rubber-duck explanation. The cheapest tool that surfaces the bug wins.
  • ›Modern debuggers (lldb, Chrome DevTools, IDE-integrated debuggers) automate the inspection — but the hypothesis-testing discipline is still on you.

Dig deeper

Phase 1 · Debugging

The concept you just explored is taught with full depth in the formal DURA curriculum.