Debug with a reproducible hypothesis | DevPrompt Lab

Turn an unclear symptom into a minimal reproduction and verified root cause.

prompt · Debugging · beginner

English Tiếng Việt

A disciplined debugging request that separates evidence from guesses and asks for the smallest safe correction.

Reusable content

Investigate the issue without changing unrelated behavior. First restate the expected and actual behavior. Identify the smallest reproduction from the evidence. List plausible causes, then test them against the logs and code paths rather than guessing. Trace the confirmed cause to the responsible boundary. Propose the smallest correction and a regression test that fails before the fix and passes after it. State what remains uncertain.

Symptom: {{SYMPTOM}}

Expected: {{EXPECTED}}

Actual: {{ACTUAL}}

Environment: {{ENVIRONMENT}}

Logs or reproduction: {{LOGS}}

How to use it

Include exact steps, versions, and sanitized logs. Remove tokens, personal data, and secrets.

Example

Reproduction: save a project, then open it as a second account.

Root cause: the detail query filters by project ID but not owner ID.

Regression test: create users A and B; assert B receives 404 for A's project.