How to Fix AI Code When You Can't Read Code
The debugging playbook for non-developers: seven techniques that resolve almost every broken AI build, from console errors to the nuclear option.
Every vibe coding success story skips the part where things broke. Things always break. The good news: debugging with AI doesn't require reading code — it requires reporting symptoms precisely and knowing seven moves. Here they are, in the order you should try them.
1. Describe the gap, not the vibe
'It doesn't work' gives the AI nothing. The formula is: what I did → what I expected → what actually happened. 'I clicked Add Task, expected the task to appear in the list, instead the page went blank.' That sentence pattern alone resolves a shocking share of problems on the first try.
2. Feed it the console error
Right-click the page → Inspect → Console. Red text is the application telling you exactly what's wrong, in a language the AI reads fluently. Copy the whole red block, paste it with: 'Here's the console error when I click the button.' This is the single highest-value debugging move that non-developers don't know exists.
3. Ask for the full file, never the snippet
When the AI says 'replace the handleClick function with this', you've been handed a surgery you're not trained for. Respond: 'Give me the complete corrected file.' Splicing snippets into the wrong place is the #1 way beginners turn one bug into three.
4. Save versions before big changes
Before asking for a major feature, copy the file: game.html → game-v7-working.html. When v8 breaks, you have something to retreat to and something to diff. Ask the AI: 'v7 worked, v8 broke after adding the timer — here are both files, find what the timer change broke.' Comparing a working and broken version is the strongest debugging context you can provide.
5. Make the AI explain before it fixes
Before changing anything: explain in plain English what this error means, what part of the code is responsible, and your theory of why it's happening. Then propose the fix and wait for my go-ahead.
This kills the 'flailing fix' loop where the AI keeps rewriting random things. Forcing a diagnosis first makes the fix targeted — and slowly teaches you how your own project works.
6. Break the doom loop with a fresh chat
If you're five fix-attempts deep and the AI keeps apologizing and breaking new things, the conversation itself is poisoned — it's pattern-matching on its own failed attempts. Start a brand-new chat: paste the current full file, state what works, what's broken, and what's been tried. Fresh context, no baggage. This feels like cheating; it's standard practice.
7. The nuclear option: rebuild from a better prompt
Sometimes the foundation is wrong and patching is throwing good prompts after bad. The move: 'Summarize everything this app does as a detailed build specification.' Take that spec, improve it with everything you've learned, and generate fresh in a new chat. Ten minutes of rebuild regularly beats two hours of archaeology — one of the few ways vibe coding is genuinely easier than real coding.
When you're truly stuck
Try a different model — they have different blind spots, and a bug one model circles forever, another spots instantly. And know the pro move exists: tools like Claude Code and Cursor can run your code, see errors themselves, and fix-test-repeat without you couriering messages. If you're debugging constantly, that's your cue to graduate from the chat window.
Keep going
Need somewhere to put it live? See where to host AI-built sites. Compare tool costs on the pricing tracker (or stick to the free options), then pick your next build.