
- Prompt at a glance
- Category
- Text & chat
- Works with
- Claude · ChatGPT · Gemini
- Length
- 97 words
- Fields to fill
- LANGUAGE, PASTE THE STACK TRACE, PASTE THE RELEVANT FILE OR FUNCTION, EXPECTED
- Last updated
Find the root cause from a stack trace
This prompt makes the AI read your stack trace from the bottom up and find the line that really causes the failure, not just where it crashes. Paste the full trace, the code it points to and what you expected to happen.
Act as a senior [LANGUAGE, e.g. Python / Django] developer helping me debug. Error and full stack trace: [PASTE THE STACK TRACE] The code it points to: [PASTE THE RELEVANT FILE OR FUNCTION] What I expected to happen: [EXPECTED, e.g. the order saves and returns 201] Walk the trace from the bottom up and tell me which line actually causes the failure, not just where it crashes. Give the most likely root cause, one or two other possible causes, a minimal fix as a code diff, and one check I can run to confirm the fix worked.
Paste the whole trace, not only the last line. The real cause is often a few frames above the crash.
From copy to answer in four steps
- 1
Open Claude and start a new chat.
- 2
Paste the prompt.
- 3
Replace each [BRACKETED] field with your real details and paste in your own text where asked.
- 4
Reply with follow-ups such as "make it shorter" or "make it sound more like me".
About this prompt
Which AI tools work with this prompt?
It is written for Claude, ChatGPT and Gemini. Paste it into your preferred tool and adjust the wording if the result is off.
What do I need to fill in?
Replace these fields before you send it: LANGUAGE, PASTE THE STACK TRACE, PASTE THE RELEVANT FILE OR FUNCTION, EXPECTED. Each field shows an example in the prompt.
Should I paste private information into the prompt?
Only what the task needs. Remove names, contact details and other sensitive data before pasting a resume or document into any AI tool.