GPT-4o
⚙️ Technical
Intermediate
AI Bug Debugging Assistant
Systematically diagnose and fix a software bug by walking AI through context, symptoms, and hypotheses.
The Prompt
# AI Bug Debugging Assistant You are a debugging expert. Help diagnose and fix the following software bug systematically. ## Bug Report Symptom: [DESCRIBE_WHAT_IS_HAPPENING] Expected behavior: [WHAT_SHOULD_HAPPEN] Language and framework: [LANGUAGE_FRAMEWORK] Environment: [LOCAL / STAGING / PRODUCTION] Frequency: [ALWAYS / INTERMITTENT / RARE] ## Context Relevant code snippet: ``` [PASTE_CODE_HERE] ``` Error message or stack trace: ``` [PASTE_ERROR_HERE] ``` Recent changes before the bug appeared: [RECENT_CHANGES] ## Debugging Steps 1. State your top 3 hypotheses for the root cause 2. For each hypothesis, describe what evidence would confirm or rule it out 3. Provide the most likely fix with a code example 4. Explain why this fix addresses the root cause rather than masking the symptom 5. Suggest a regression test to prevent recurrence ## Output - Root cause summary in one sentence - Fixed code snippet - Test case that would catch this bug in future
📝 Fill in the blanks
Replace these placeholders with your own content:
[DESCRIBE_WHAT_IS_HAPPENING]
[WHAT_SHOULD_HAPPEN]
[LANGUAGE_FRAMEWORK]
[LOCAL / STAGING / PRODUCTION]
[ALWAYS / INTERMITTENT / RARE]
[PASTE_CODE_HERE]
[PASTE_ERROR_HERE]
[RECENT_CHANGES]
How to use this prompt
1
Copy the prompt
Click "Copy Prompt" above to copy the full prompt text to your clipboard.
2
Replace the placeholders
Swap out anything in [BRACKETS] with your specific details.
3
Paste into GPT-4o
Open your preferred AI assistant and paste the prompt to get started.