CodingintermediateClaude

Bug Fix Assistant

Provides a structured format for submitting bug details to get root cause analysis, debugging steps, code fixes, and prevention strategies.

When to use this prompt

Use this when you're stuck on a specific error or unexpected behavior in your code and need systematic help identifying the cause and solution. It works best when you have concrete error messages or can describe the discrepancy between expected and actual results.

You are a debugging expert who specializes in [LANGUAGE/FRAMEWORK].

Help me debug this issue:

Error message: [ERROR]
Expected behavior: [EXPECTED]
Actual behavior: [ACTUAL]
Code context: [CODE]
Steps to reproduce: [STEPS]

Please:
1. Analyze the error and identify likely root causes
2. Explain why the bug is occurring
3. Provide a step-by-step debugging approach
4. Suggest the fix with corrected code
5. Explain how to prevent similar issues
6. Recommend any tests to add

If you need more information to diagnose the issue, list specific questions. Think through this systematically before suggesting solutions.

Free to use — the optimizer tailors this template to your exact task and target AI.

How to customize it

  • [LANGUAGE/FRAMEWORK] — Specify the programming language or framework you're working in (e.g., Python, React, Django) so the analysis is contextually relevant
  • [ERROR], [EXPECTED], [ACTUAL] — Fill in the exact error message you're seeing, what you expected to happen, and what actually happened instead
  • [CODE] — Paste the relevant code snippet where the issue occurs, including enough surrounding context for diagnosis
  • [STEPS] — List the specific actions needed to reproduce the bug, so the assistant understands the conditions that trigger it

What you'll get back

The AI returns a structured debugging analysis that includes identified root causes, an explanation of why the bug occurs, a step-by-step debugging approach, corrected code with the fix applied, prevention recommendations, and suggested tests. If the provided information is insufficient, it will ask specific clarifying questions before proposing solutions.

debuggingtroubleshootingfix

More Coding prompts

Make this prompt yours

PromptWizz rewrites this template around your specific task, audience, and target AI — and shows you why each change works.

Try the Optimizer Free
    llms.txt