---
title: "Bug Report Prompt"
description: "Structured prompt for debugging with Claude Code"
type: "prompt"
category: "atomic"
tags: ["claude-code", "prompt", "debugging"]
url: "https://theglitch.ai/academy/prompts/bug-report-prompt"
---

# Bug Report Prompt

Structured prompt for debugging with Claude Code

## The Prompt

```
Bug: [One sentence description]

Error:
[Full error message or stack trace]

Reproduce:
1. [Step 1]
2. [Step 2]
3. [Bug occurs]

Expected: [What should happen]
Actual: [What happens]

Context:
- Started after [recent change]
- Relevant files: [list]

Find root cause and fix.
```


# Bug Report Prompt

```
Bug: [One sentence description]

Error:
[Full error message or stack trace]

Reproduce:
1. [Step 1]
2. [Step 2]
3. [Bug occurs]

Expected: [What should happen]
Actual: [What happens]

Context:
- Started after [recent change]
- Relevant files: [list]

Find root cause and fix.
```

---

**Example:**

```
Bug: User registration fails silently.

Error:
TypeError: Cannot read property 'email' of undefined
    at UserService.create (user.ts:42)
    at RegisterController.handle (register.ts:18)

Reproduce:
1. Go to /signup
2. Fill all fields
3. Click "Create Account"
4. Nothing happens (no error shown to user)

Expected: Redirect to /dashboard or show error
Actual: Button spinner stops, nothing else

Context:
- Started after adding email verification feature
- Relevant files: /src/services/user.ts, /src/controllers/register.ts

Find root cause and fix.
```

---

**Key elements:** Full error, reproduction steps, expected vs actual.

