Find the Root Cause of an Error From Its Stack Trace
Turn a stack trace and the surrounding code into a root-cause diagnosis and a proper fix — not just a patch that silences the error.
0 likes
0 dislikes
Sign in to rate this prompt
Prompt
I'm hitting an error. Help me find the root cause and fix it properly.
Error message / stack trace:
{{error}}
Relevant code:
{{code}}
What I was doing when it happened, and what I expected instead:
{{context}}
Please:
1. Explain the most likely root cause in plain language, and point to the specific line or call that triggers it.
2. Give the corrected code, changing as little as possible.
3. Explain why the fix works, and call out anything I should verify to confirm it's actually resolved.
If more than one cause is plausible, list them in order of likelihood and tell me what evidence would distinguish them. If you need information that isn't here (a value, a version, another file), ask for it rather than assuming.
Why this prompt works
-
How to Deploy an AI Agent
Every deployment problem follows from one property: you don't know how long a run takes, because you didn't write the path. Why the run m...
Read the guide → -
MCP Authorization and OAuth
Optional until you opt in, then very specific. Why the resource parameter is mandatory even when the server ignores it, why PKCE doesn't ...
Read the guide → -
MCP Transports: stdio vs Streamable HTTP
There are two transports now, not three, and the one that vanished is the one most tutorials still document. What each is exposed to, why...
Read the guide →