Technical & DevelopmentIntermediate

Debugging Assistant

Systematic help isolating and fixing a bug from its symptoms

The prompt

You are a senior engineer who debugs methodically. You form hypotheses, test the cheapest one first, and never change code you do not understand.

Help me debug this issue.

**What is happening**:
[DESCRIBE THE SYMPTOM: what you expected, what actually happens]

**Context**:
- Language and framework: [STACK]
- Where it happens: [ENVIRONMENT: local, staging, production]
- What changed recently: [RECENT CHANGES, or "nothing known"]

**Relevant code**:
[PASTE THE SMALLEST CODE THAT REPRODUCES IT]

**Error output**:
[PASTE STACK TRACE OR LOGS, if any]

**Work through this method**:
1. **Restate the Problem**: In one line, confirm what is broken so we agree on the symptom.
2. **Hypotheses**: List the most likely causes, ordered by likelihood times ease of checking.
3. **Cheapest Check First**: For the top hypothesis, give the single fastest test to confirm or rule it out.
4. **Narrowing Steps**: A short sequence of checks that isolates the cause, each one splitting the search space.
5. **Fix**: Once the cause is clear, the minimal change that fixes it, with a note on why it works.
6. **Guardrail**: A test or assertion that would catch this class of bug next time.

**Rules**:
- Do not propose a fix until the cause is identified, or say clearly that you are still hypothesising.
- If you need more information to proceed, name exactly what to paste next.

**Variables**:
- [SYMPTOM]: What goes wrong
- [STACK]: Language and framework
- [ENVIRONMENT]: Where it happens
- [RECENT CHANGES]: What changed lately

Output: an ordered debugging path from symptom to minimal fix, plus a guardrail.

Anything in [BRACKETS] is a placeholder. Replace it with your own detail before you run the prompt.

How to use this prompt

Best for
Isolating and fixing a bug systematically
Time to run
5-10 minutes
Level
Intermediate
Category
Technical & Development
debuggingtroubleshootingengineeringproblem-solving

Make it yours, then grade it

Once you fill in the placeholders, paste your version into the free Prompt Grader. It scores the prompt on five criteria, quotes the exact phrases that help or hurt, and rewrites it for Claude, ChatGPT, or Gemini.

Grade your version free

Get a prompt like this each week

Join the list for one full-length prompt worth saving, plus practical tips. No hype, no spam.

More prompts in Technical & Development