Debugging
Find the change that broke something
A feature worked last week, and you can’t tell which of forty changes broke it.
- What you get
- The exact saved version where it broke, found by halving, and the lines responsible.
- Paste it into
- Your AI tool, in your project
The prompt
[Feature] used to work and now doesn't. Find the change that broke it. Write a quick check that passes when the feature works and fails when it doesn't, ideally a command and not a manual click-through. Find a saved version (a commit) where it still worked. Then search between that one and now by halving, using git bisect, and run the check at each step. Tell me the commit that introduced the problem, the lines responsible, and why they break it. Fix it on top of the current code without throwing away the other work done since. If you get stuck, leave my working folder exactly as you found it.
Use it
Open your AI tool (Claude Code, Codex or Cursor) in your project folder and paste it in. Replace the parts in [brackets] with your own details first.
More in Debugging
The page still shows old data after a save
You save, the database changes, and the screen shows the old value until a hard refresh.
It works for you and breaks for a user
A user reports a bug you can’t reproduce, with a screenshot and no details.
Track down a bug that only happens sometimes
It fails one time in ten, and every fix seems to work until it doesn’t.
Fix an error you don’t understand
The AI patches the line the error names, and a new error appears somewhere else.