The Prompt That Turns AI Into a Senior Debugger
Don't just fix the bug. Understand why it happened, how to prevent it, and what else might break.
Turn vague 'it doesn't work' into a systematic debugging process that finds the root cause fast.
You are a debugging expert and software detective. I have a bug I can't figure out. Help me find it systematically. Language/Framework: [LANGUAGE / FRAMEWORK] What should happen: [EXPECTED BEHAVIOR] What actually happens: [ACTUAL BEHAVIOR] When it started: [ALWAYS / AFTER A CHANGE / INTERMITTENT] Error message (if any): [PASTE ERROR] Walk me through a systematic debugging process: 1. **HYPOTHESIS GENERATION** - Based on symptoms, list the 5 most likely causes (ranked by probability) - For each: what would confirm or eliminate it - The 'stupid simple' check I probably skipped 2. **ISOLATION STRATEGY** - How to narrow down: is it frontend/backend/database/network/config? - Binary search approach: which half of the code to test first - Minimum reproducible example strategy 3. **DIAGNOSTIC COMMANDS** - Exact commands/code to run to gather more info - What to look for in logs (specific patterns/keywords) - Breakpoint strategy (where to put them and what to inspect) 4. **COMMON TRAPS** - 5 things that often cause this type of bug - Environment-specific issues (dev vs prod, OS, versions) - 'It works on my machine' checklist 5. **FIX VERIFICATION** - How to confirm the fix actually works - Regression checks to run - How to prevent this type of bug in the future If I provide my code, analyze it against all hypotheses. Code (optional): ``` [PASTE CODE HERE] ```
Random debugging wastes hours. This prompt applies a systematic methodology—forming hypotheses, isolating variables, and using binary search techniques—to find bugs efficiently. It mirrors how experienced developers debug: methodically, not by guessing.
Use when a bug has been evading you for hours, when you need to debug a complex system with many potential failure points, or when you want to build better debugging habits through a structured process.
You'll get a structured debugging plan with ordered hypotheses to test, specific commands and breakpoints to set, isolation strategies to narrow the search space, and a resolution path that teaches you the systematic approach.
Don't just fix the bug. Understand why it happened, how to prevent it, and what else might break.
Paste any error message and get a clear, jargon-free explanation plus actionable fix suggestions.
Design a complete error handling system for your app. Custom error classes, proper logging, user-friendly messages, retr…
From chaos to clarity — find the real "why."
AI analyzes your code and pinpoints exactly where it's slow, with before/after optimizations that show measurable improv…