coding•6 prompts
Debugging Prompts
Debugging is detective work. These prompts help AI assist your investigation by analyzing errors, suggesting causes, and proposing fixes.
1. Error Analysis
Best: ClaudeHelp me debug this error: [paste error message and stack trace]. The code that triggered it: [paste relevant code]. What I expected to happen: [describe]. What actually happened: [describe]. Explain the likely cause and suggest a fix.
Context matters. Include the full stack trace and surrounding code.
2. Rubber Duck Debugging
Best: ClaudeI'm stuck on a bug. Let me explain: [describe the problem, what you've tried, and your assumptions]. Ask me clarifying questions to help me think through this systematically. Sometimes explaining it reveals the issue.
Often the act of explaining reveals the bug. Let AI be your rubber duck.
3. Reproduce This Bug
Best: ClaudeHelp me create a minimal reproduction of this bug: [describe the bug]. My environment: [tech stack]. Create the smallest possible code example that demonstrates the issue. This will help me isolate the cause.
Minimal reproductions are the key to finding and fixing bugs.
4. Debug Async Issues
Best: ClaudeI have a race condition or async timing issue: [describe symptoms]. Here's the relevant async code: [paste code]. Help me understand the execution order, identify where timing assumptions might be wrong, and suggest fixes.
Async bugs are tricky. Trace through execution order step by step.
5. Memory Leak Investigation
Best: ClaudeI suspect a memory leak in my [language/framework] application. Symptoms: [describe]. Here's the suspected code area: [paste]. Help me identify potential leak sources: event listeners not cleaned up, closures holding references, cache growth, etc.
Memory leaks often involve event listeners or closures. Check cleanup code.
6. Log Analysis
Best: ClaudeAnalyze these application logs to identify the issue: [paste logs]. Look for: error patterns, timing of failures, suspicious sequences, and correlations. What should I investigate next?
Claude's large context handles long log files. Include timestamps.
Try These Prompts with Multiple AIs
Get responses from Claude, ChatGPT, Gemini, and more—all at once. Compare which AI handles these prompts best.
Try Council Free