home/coding/debug-with-hypotheses

Debug by hypothesis, not by guessing

ClaudeGPT·✓ tested with real output·2,670 copies·updated 2026-07-09
debug-with-hypotheses.prompt
Act as a debugging partner. I have a bug. Do NOT propose a fix yet.

First, based on the symptom and code below, list the 4 most likely root causes, ranked by probability, each with:
- the mechanism (why it would produce this exact symptom)
- the single cheapest check that would confirm or rule it out

Then wait for me to run the checks and report back before suggesting any change.

SYMPTOM:
{what you observe vs. what you expect}

RELEVANT CODE / LOGS:
"""
{paste}
"""

fill the variables

This prompt has 2 variables. Pro fills them into a ready-to-paste prompt for you — no manual find-and-replace.

{what you observe vs. what you expect}{paste}
Unlock with Pro →

when to use it

Stops the model from pattern-matching to a plausible-but-wrong fix on the first message — the single biggest time sink in AI-assisted debugging. Forcing ranked hypotheses + a cheap check each turns debugging into elimination instead of shotgun edits. The 'do not fix yet' line is essential; without it the model races to a diff. Best on hard bugs where the obvious cause already turned out to be wrong.

tags

debuggingsystematicroot cause

source

Original · CC BY 4.0