Software Development
Coding
Debugging

Debug an Error Message

Work through an error message or stack trace systematically instead of guessing.

Universal

Use case

Use when you're stuck on an error and want a structured diagnosis rather than a single guessed fix.

Customize

Preview

I'm getting this error in a {language}/{framework} project:

```
{error_message}
```

Relevant code:
```
{code_context}
```

Walk through: (1) what this error means in plain language, (2) the most likely 2-3 root causes given the code context, ranked by likelihood, (3) how to confirm which one it actually is, and (4) a fix for the most likely cause. Don't just paste a fix without explaining the reasoning — I want to understand why it happened, not just make the error disappear.

Usage guidance

Include the actual code around the failure point, not just the error text — most debugging value comes from the model seeing what the code does right before the failure.

Example input

Language: Python/Django. Error: "IntegrityError: UNIQUE constraint failed: auth_user.email". Code: [user registration view]

Example output

1. This means you're trying to insert a row that violates a unique constraint on email...

Last updated Jan 1, 2026

Related prompts