Sandbox demo
Debugging with Claude
Hypothesis → instrumentation → evidence → fix. The structured-debug pattern.
Most debugging fails because people guess. The structured pattern is: state a hypothesis ('I think X is null because Y'), instrument to test it (add a log, write a failing test), observe, then either confirm and fix or update the hypothesis.
The agent is great at this if you ask it to follow the pattern explicitly. Without that prompt, it will sometimes leap to a fix without proving the cause.
Sandbox transcript
Press Play to replay this transcript step-by-step.
0 / 10
The transcript is canned — no real API calls. The point is to internalize the loop: user → plan → tool → result → answer.
Check your understanding
Q1. Why is writing a failing test before fixing a bug valuable?
· Score 100% on the quiz.