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.
Related prompts
API Endpoint Designer
Generates complete RESTful API endpoint specifications including HTTP methods, request/response formats, authentication, error codes, and OpenAPI snippets.
API Rate Limiter Design
Generates a complete rate limiting system design for your API, including strategy selection, implementation code, configuration, and monitoring setup.
Architecture Decision Record
Generates a structured Architecture Decision Record (ADR) documenting technical choices, their context, consequences, and alternatives considered.
Build Your Complete CI/CD Pipeline with Quality Gates
Generates a complete CI/CD pipeline design with stages, quality gates, deployment strategy, and configuration files tailored to your tech stack and deployment target.
Design a Multi-Environment CI/CD Deployment Strategy
Generates a complete CI/CD pipeline design with stages, environment promotion rules, quality gates, and configuration files for your specific stack and hosting setup.
Code Explanation for Beginners
Generates beginner-friendly code explanations with line-by-line breakdowns, concept definitions, data flow analysis, and practice exercises.
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