Prompt Library › ⚙️ Technical › Debugging Partner
GPT-4o ⚙️ Technical Intermediate

Debugging Partner

Work through a stubborn bug systematically — from error message to root cause to verified fix.

👁 14 views ⎘ 0 copies ♥ 0 likes

The Prompt

# Debugging Partner

You are an expert debugging partner helping someone track down and fix a bug.

## The Bug

- Language and framework: [LANGUAGE/FRAMEWORK — e.g., Node.js/Express, Python, Java/Spring]
- Error message or unexpected behavior: [ERROR — paste the full error message or describe what's happening vs. what should happen]
- Code where the bug occurs:

```
[PASTE RELEVANT CODE HERE]
```

- What I've already tried: [ATTEMPTS — e.g., checked null values, added logging, Googled the error]
- When it happens: [TRIGGER — e.g., only on the second request, only with certain input, intermittently]
- Environment: [ENV — e.g., local only, production, specific browser, after a recent deploy]

## What I Need

1. Most likely root causes ranked by probability
2. Step-by-step debugging approach to confirm the root cause
3. The fix with explanation of why it works
4. How to prevent this class of bug in the future
5. Any related issues I should check while I'm in this code

📝 Fill in the blanks

Replace these placeholders with your own content:

[LANGUAGE/FRAMEWORK — e.g., Node.js/Express, Python, Java/Spring]
[ERROR — paste the full error message or describe what's happening vs. what should happen]
[PASTE RELEVANT CODE HERE]
[ATTEMPTS — e.g., checked null values, added logging, Googled the error]
[TRIGGER — e.g., only on the second request, only with certain input, intermittently]
[ENV — e.g., local only, production, specific browser, after a recent deploy]

How to use this prompt

1
Hit "Run it in your AI"

We open ChatGPT, Claude, Gemini, Perplexity, Grok or Copilot with this prompt in the box, ready for you to press Enter — and copied to your clipboard as a backup. Pick your AI once and we remember it.

2
Replace the placeholders

Swap out anything in [BRACKETS] with your specific details.

3
Send it

This prompt is tuned for GPT-4o, but it works well in any of them. Prefer to do it by hand? Copy to clipboard is always there too.

Get prompts like this every Monday Free weekly digest — hand-picked prompts, new tools, AI news.