Skip to content

Free guide

Find the first point where reality diverges

Use a minimal reproduction, a falsifiable hypothesis and one observation at a time to debug a user-visible failure.

Why it matters

A product manager can obtain a precise bug report. A developer can distinguish a drawing error, permission error, stale cache or failed write without changing several systems at once.

Core concepts

Capture the conditions

Record role, environment, app version, browser, route, synthetic fixture, expected result and actual result. Include sequence and timing. A bug that appears only on a second visit is a different problem from one that appears on first load.

Follow evidence across boundaries

Start from the visible failure. Check whether the click happened, the request left, the response indicated success and the later read returned the new state. Use a sanitized request identifier to connect observations across services.

Make competing predictions

If the filter is wrong, the server may have a record the view hides. If the write failed, a direct read through the authorized app will also miss the record. Pick an observation that gives different predictions. Ask the agent to label facts separately from hypotheses.

Preserve a failing example

Reduce the case until it still fails for the same reason. Add the smallest regression at that boundary and one check through the user path. Remove temporary logging that could expose private fields.

Try it step by step

  1. Reproduce with a safe fixture and record the first incorrect observation.
  2. Write two plausible explanations and an observation that distinguishes them.
  3. Change one thing, repeat the exact steps and verify that neighboring behavior still works.

Use a three-column log: prediction, observation, next decision. Stop once the observation contradicts the hypothesis.

Worked example

Fictional example: A queue item “vanishes” after Save. The POST succeeds. The next GET contains the item, but its new status falls outside the default list filter. The fix is to show where it moved and provide a link to the destination.

Debugging prompt
Reproduce [visible failure] using [role, route and synthetic fixture].
Record expected versus actual at the UI, request, reply and later read.
List two possible causes and one observation that distinguishes them.
Identify the first failing boundary before editing code.
Make a focused fix, keep the smallest regression and repeat the original steps.
Report observations, unsupported hypotheses and remaining uncertainty.

Common mistake

Asking an agent to “fix it again” after every guess and leaving a trail of unrelated edits.

Practice exercise

Write a reproduction for an edit that survives navigation within the app but disappears on reload. Identify one observation that distinguishes local state from a server write.

Check your understanding

The response includes the updated row, but the list hides it. What next?

  1. Inspect the display filter and status mapping
  2. Rewrite database indexes
  3. Increase the retry limit
Show answer

Inspect the display filter and status mapping. The record has already crossed the read boundary. The first unexplained step is how the view selects rows.

Takeaway

A small observation that contradicts a theory saves more time than another guess.

Further reading

Browse more lessons