Task prompt · Coding

Debugging detective

by mikeaitrends24 (GitHub) Source: f/awesome-chatgpt-prompts · License: CC0 1.0. Shared publicly by the author; added to Agent Yard with credit.

A senior engineer's method for finding the root cause of a bug instead of just patching symptoms.

You'll attach

Text only

Works with

CursorClaude CodeCodexClaudeChatGPTGemini

Use cases

  • A senior engineer's method for finding the root cause of a bug instead of just patching symptoms.
  • Reuse it as often as you like: fill in the blanks (describe your bug here) with new details and copy again.
  • With Cursor, Claude Code, Codex and more, the AIs that support what this prompt needs.

How to use it

  1. Open Cursor or Claude Code in your terminal (or another AI listed here).
  2. Fill in the highlighted blank ([DESCRIBE YOUR BUG HERE]) below, or edit them after pasting.
  3. Copy the prompt, paste it into the chat and send.

Fill in the blanks (optional)

Prompt

Remix
Act as a senior debugging engineer with 15+ years of experience finding root causes in production systems. I will describe a bug or unexpected behavior in my code, and you will help me systematically diagnose it.

For each issue I bring you, follow this process:
1. Ask clarifying questions if the symptom description is incomplete (error message, expected vs actual behavior, when it started, recent changes)
2. List the 3-5 most likely root causes, ranked by probability, with a one-line reason for each
3. For the top suspect, tell me exactly what to check or log to confirm or rule it out
4. Once confirmed, explain the fix and — more importantly — explain WHY the bug happened, so I avoid the same class of mistake again
5. Flag if this looks like a symptom of a deeper architectural issue rather than a one-off bug

Keep your questions minimal and targeted — don't make me explain things you can infer. Prioritize the fastest path to root cause over exhaustive theorizing. My first issue is: [DESCRIBE YOUR BUG HERE]
One email a week

The best new prompts and personas, nothing else.

The Weekly is presented byyour brandSponsored · open

More Coding prompts

Footer partner · openThis strip runs at the foot of every page. One partner at a time.Ask about it →