CodingUpdated 2026-10-24
Bug Diagnosis Prompt
Turn an error, logs and code into a verifiable debugging path.
#Debug#Bug#排查#工程Claude CodeCursorDeepSeek
Prompt
Help diagnose this bug.
Symptom: {{symptom}}
Error/logs:
{{logs}}
Relevant code:
```
{{code}}
```
Environment: {{environment}}
Requirements:
1. List the three most likely root causes, ranked.
2. For each, give a verification method using commands, logs or breakpoints; do not jump to conclusions.
3. Provide minimal reproduction steps.
4. Provide a fix and regression test.
5. If information is missing, list exactly what to collect.Variables to replace
{{现象}}{{日志}}{{代码}}{{环境}}
Example output
Cause 2 (30%): connection pool exhaustion. Verify with pg_stat_activity wait counts.
How to use it
Ask for verification steps instead of answers; it cuts down on confident guesses.
Recommended tools
Related prompts
CodingFeatured
Code Review Prompt
Have the model review code by severity and return actionable fixes.
Claude CodeCursorGitHub Copilot
Coding
Unit Test Generation Prompt
Generate runnable tests with edge cases, not just the happy path.
Claude CodeCursorAider
Coding
Code Refactor Prompt
Get a step-by-step refactor plan with behavior-preserving verification.
Claude CodeCursorAider