Logo
Software DevelopmentIntermediateAnalysis

Debug an Error Systematically

Work through a bug with likely causes ranked, checks to confirm each one and a minimal fix.

When to use it: Use when you're stuck on an error or unexpected behavior.

Works with: Any chat assistant

What you'll need

  • Expected (required)
  • Actual (required)
  • Error message / stack trace (optional)
  • Relevant code (optional)
  • Environment (optional)
  • What you've tried (optional)

The prompt

Help me debug this problem methodically.

What I expected: [EXPECTED]
What actually happens: [ACTUAL]
Error message and stack trace:
```
[ERROR]
```
Relevant code:
```
[CODE]
```
Environment (language/framework versions, OS, recent changes): [ENVIRONMENT]
What I've already tried: [TRIED]

Please:
1. List the 3–5 most likely causes, ranked, with your reasoning.
2. For each, a quick check or log statement that would confirm or rule it out.
3. A minimal fix for the most likely cause, and how to verify it.
4. How to prevent this class of bug (test, type, validation).

Don't assume versions or configuration I haven't told you; ask if it matters.

Words in [BRACKETS] are placeholders. Fill them in below, or replace them yourself after copying.

Customize the prompt

Fields marked * are required. Leave optional fields empty to fill them in later.

What you'll get

Ranked causes with checks, a minimal fix and prevention ideas.

How to use it

  1. Fill in the fields above (at least: Expected, Actual) and select Generate My Customized Prompt.
  2. Copy the result, or open it directly in ChatGPT, Claude or Gemini.
  3. Review the answer and ask follow-up questions to refine it.
  4. Edit the final result in your own words and check any facts before using it.

Open the original prompt in an assistant

We never ask for your AI account login. ChatGPT and Claude open with the prompt filled in when it's short enough for a link; Gemini always needs a paste.

Tips

  • Share the smallest code sample that reproduces the problem; it gives much better answers than a whole file.

Limitations

  • AI-suggested code can be wrong or insecure. Review it and run your tests before relying on it.
Debug an Error Systematically: AI Prompt for ChatGPT, Claude & Gemini | AICreatify