Coding
Debug without guessing
Forces hypotheses ranked by likelihood, each with a way to test it — instead of a confident wrong answer.
Prompt
I have a bug.
What should happen: {{expected}}
What actually happens: {{actual}}
Error message: {{error}}
What I've already tried: {{tried}}
Relevant code:
```
{{code}}
```
Give me:
1. The 5 most likely causes, ranked by probability
2. For EACH: a specific way to confirm or rule it out (a log line, a check, a command)
3. Which one you'd test first and why
Do not give me a fix yet. I want to confirm the cause first.Fill these in
Replace each highlighted variable before sending. Leaving them in place is the most common reason these prompts under-perform.
| Variable | What to put | Example |
|---|---|---|
{{expected}} | Expected behavior | Form submits and shows success |
{{actual}} | Actual behavior | Page reloads, data lost |
{{error}} | Error text, or 'none' | none in console |
{{tried}} | What you ruled out | Checked the endpoint returns 200 |
{{code}} | Relevant code | Paste the handler |
Tips for better output
- "Do not give me a fix yet" is the important line — it stops confident fixes for the wrong cause.
- Listing what you already tried prevents the model repeating your dead ends.