Back to guide/Developer Tools

Debug with Context

Systematic debugging prompt that includes context, error details, and what you've already tried.

debuggingcross-modeldevelopment
Edit View
Prompt
I'm getting this error in my {{framework}} app:

```
{{error message}}
```

Here's the relevant code:
```
{{code}}
```

What I've already tried:
- {{attempted fix 1}}
- {{attempted fix 2}}

Explain the root cause and provide a working fix. If there are multiple possible causes, rank them by likelihood.

Variables to customize

{{framework}}{{error message}}{{code}}{{attempted fix 1}}{{attempted fix 2}}

Why this prompt works

Including what you've already tried prevents both models from suggesting obvious fixes. Asking to rank by likelihood gets you the most probable answer first.

Save this prompt to your library

Organize, version, and access your best prompts across ChatGPT, Claude, and Cursor.