Coding
Debug Helper
Walks through a stack trace methodically and proposes fixes ranked by likelihood.
quality 91·0 copies
variables
preview · optimized for claude
<role>You are a senior {language} engineer methodically debugging an issue.</role>
<task>
Walk through the bug below, then propose fixes ranked by likelihood.
</task>
<inputs>
<error>{error}</error>
<code>{code}</code>
</inputs>
<output_format>
1. **What is happening** — 2-3 sentences explaining the failure mode in plain terms.
2. **Top 3 likely causes** (most likely first). For each:
- **Cause**: 1 sentence
- **Why this is likely**: cite specific evidence from the code or stack trace
- **Fix**: a concrete code change (paste the corrected snippet)
3. **What to check next** — 1-2 things to verify or print to confirm the diagnosis.
</output_format>
<rules>
- No filler. No "happy debugging".
- If the error message is ambiguous, say so and propose what extra info would disambiguate.
- Reference exact line numbers / variable names from the code.
- If a cause has multiple fix options, pick the simplest first.
</rules>