How to Debug an Error Message You Do Not Understand
A paste-first skill for an error message you do not understand. Isolate the claim, demand a file-plus-line hypothesis, ban shotgun fixes, and keep ChatGPT, Claude, or Gemini from rewriting your project.
Anyone stuck on a red line can debug an error message they do not understand in 15 minutes: paste the text, force a restatement, isolate one hypothesis with a file and a line, then you run one check. Use ChatGPT, Claude, or Gemini on logs you are allowed to share.
The error is the source. A confident patch is not a diagnosis.
If you paste “fix this” and a wall of code, you will get a rewrite and a new error. Turn the loop into a skill. Start with what a skill prompt actually is, then lock the isolate-then-check law below.
Isolate the error before anyone “fixes” it
Diagnosis first. Edit second. If you reverse that, you are playing whack-a-mole with a poet.
1. Paste the error. Demand a mirror.
Paste the exact message, the stack if you have one, and the command you ran. Instruct:
“Do not fix this. Repeat the error in my words. Name the exception or code. Name the top frame that is mine, not a library, if the stack shows one. If you cannot see a frame, write UNKNOWN. Do not invent a file.”
ChatGPT will try to help. Claude will try to be complete. Gemini will try to be fast. All three will skip the mirror if you let them.
This is the same grounding move as studying a PDF without fake quotes. The error text is the document. No sentence in the paste, no claim.
2. One hypothesis, four fields
Only after the mirror:
- What failed, in one sentence.
- File and line, from the stack or UNKNOWN.
- Why this message would appear, in one sentence, tied to the text.
- One check you can run in under five minutes.
“Give me one hypothesis. If you have a second, write PARKED. Do not list seven possible causes. Do not paste a patched function.”
Seven causes is a search-result costume. PARKED keeps the extra thought from becoming a shotgun.
3. Ban the silent rewrite
Tell the model: “Do not output a full-file replacement. Do not output a new dependency. If the check needs a one-line change, show only that line and mark it as a candidate, not as truth.”
A full-file replacement is how a missing import becomes a reformatted module you cannot review.
You run the check. The model does not get to declare victory in prose.
4. Privacy fork for logs you cannot leak
Stack traces can carry host names, tokens, customer ids, and paths. Strip those before a hosted chat.
If you cannot strip enough, do not paste. Use a local model and keep the log on your box. The Qwen 3.8 27B local coding-agent note is the pattern: local does not mean grounded. You still demand the mirror and the one-hypothesis cap.
Never ask the model for exploit steps, payloads, or “how an attacker would trigger this.” You are reading a message you already have, on a system you already run.
5. Record the check, then stop or loop once
Write down: hypothesis, check, result. If the check fails, send the new error as a new mirror. Do not stack hypotheses in the same turn.
“Replace the hypothesis with one new one based only on this new paste. Delete the old patch candidate.”
Two loops. Then stop and read the file yourself. A third loop is how a 15-minute debug becomes an afternoon of generated guesses.
Save the mirror-hypothesis-check loop in the Promptcrates tools for reusable skills so the next red line does not start from “fix this.”
Reusable skill card
Trigger: You do not understand an error message and you are about to paste a repo into ChatGPT, Claude, or Gemini.
Input: Exact error, stack if you have it, the command, a stripped log, and a ban on full-file rewrites.
Output: A mirror, one four-field hypothesis, one five-minute check, PARKED extras, UNKNOWN if the file is not in the paste.
Stop: After two check loops or one confirmed check. No exploit writeup. No dependency swap. No “while we’re here.”
Takeaways
- Mirror the error first. A first-reply patch is a guess.
- One hypothesis, one check. PARKED for the rest.
- File and line or UNKNOWN. No invented frames.
- Strip secrets. Private logs stay local.
- Save the loop as a skill. Stop after two misses and open the file.
Frequently Asked Questions
Can I paste my entire file with the error?
Paste the error, the stack you have, and the smallest snippet around the named line. A whole file is how the model rewrites neighbors that already work.
What if the model gives a fix in the first reply?
Reject it. The first reply should be a restatement of the error in your words. A first-reply patch is a guess with extra confidence.
Should I run a local model on private logs?
Yes, if the log cannot leave your machine. Hosted chats are not a vault. The isolate-then-check law still applies.
Can I ask it to “just make it work”?
No. That prompt invites a rewrite. You want one hypothesis and one check you will run.
What if there is no stack trace?
Then the error text is the whole source. Do not let the model invent a stack. UNKNOWN on the file is allowed.