← Prompt libraryDebug Systematically
Skill · Debugging · #debug #method
debug-systematically
A disciplined method for finding a bug's root cause instead of guessing. Use when a bug's cause is unclear and you want a rigorous hunt, not a guess.
Debug systematically
Find the real cause before changing any code.
Steps
- Reproduce it reliably. Capture the exact inputs, environment, and the smallest case that triggers it.
- State expected vs. actual behavior precisely.
- List hypotheses — the most likely causes, ranked.
- Test the cheapest hypothesis first with a targeted check or log, not a shotgun change.
- Narrow by bisecting: disable half, see if it persists, repeat.
- Once found, write a failing test, then fix, then confirm the test goes green.
Output
The root cause, the evidence that confirms it, the minimal fix, and the regression test that locks it in.
This is one of dozens of free prompts in the AIStorageDepot library. Sign up free to save them, version them, and pull them straight into Claude, Cursor, or VS Code over MCP.