CoreMesh

Explain a Stack Trace Line by Line

Long stack traces hide the one line that matters. This prompt asks the model to find it, explain the chain of calls, and point you to the file to open first.

Works with Claude, ChatGPT and Gemini3 fields

prompt.md · 486 charslive
Explain this Node.js 20 stack trace to someone who is comfortable with JavaScript, new to this codebase:

```
TypeError: Cannot read properties of undefined (reading 'map')
    at renderList (src/list.js:14:22)
    at App (src/app.js:31:5)
```

1. Which frame is the real source of the problem, and why that one?
2. In one line each, what happened in the frames above it?
3. What are the two most likely causes?
4. Which file and line should I open first, and what should I check there?

Everything you type stays in your browser. Remove passwords, keys and personal data before pasting anything into an AI tool.

Why this prompt is written this way

  • Find the real frame. The first line is often library code; asking which frame matters points you at your own code.
  • Level of the reader. Saying who you are changes how much the model explains, so you skip what you already know.
  • A next step. Ending with 'which file should I open' turns the explanation into an action.

Example answer

Illustrative and shortened, to show the shape of a good answer. Real answers vary by model.

1. src/list.js:14 is the source: renderList calls .map on a value that is undefined.
2. App renders the list before the data has loaded.
3. Likely causes: the fetch hasn't finished, or the API returned a different shape.
4. Open src/list.js line 14 and check what 'items' is on the first render.

Tips

  • Include the whole trace, including the lines that look like framework noise.
  • If the trace mentions a file you can share, paste that function too in a follow-up.

How to use it

  1. Replace the example values with your own. The prompt on the right updates as you type.
  2. Press Copy prompt and paste it into any AI chat, or open it straight in Claude or ChatGPT.
  3. Save it as prompt.md if you want to reuse it.
Claude ↗

New notes, no spam.

One post at a time, only when there's something worth reading. Follow in any feed reader.

Subscribe via RSS