Fix errors and test like a developer (with AI as your pair)
Advanced · 10 min
Goal: You will run a proper testing pass: read errors calmly, fix root causes, and keep a regression list.
Every app breaks; professionals differ by process, not by luck. This episode teaches the developer's debugging loop with AI as your pair programmer: reproduce, isolate, read the actual error, fix one thing, and record the test so the bug can never silently return.
Steps
- Reproduce before you fix: Write the exact steps that trigger the bug, every time, in order. A bug you cannot reproduce is a rumour. Note device, account and data state — half of 'random' bugs are one specific state you forgot you were in.
- Read the error like a message, not a mood: Find the real error text (browser console, builder logs, red banner) and paste it exactly into your assistant with your reproduction steps. Ask: 'What is this error saying in plain words, and what are the two most likely causes?' Fix cause one first.
- Isolate: shrink the problem: Remove variables until the bug is minimal: one test account, one item, one action. AI fixes small isolated problems brilliantly and large tangled ones by guessing — your job is to hand it small problems.
- Fix one thing, then re-run the whole scene: After each fix, re-run the reproduction AND the happy path (the normal use around it). Many AI fixes cure the bug and break the neighbour; the re-run is how you catch it the same hour, not after launch.
- Keep the regression list: Every fixed bug becomes a line in a test checklist: 'Add item with empty title shows message, no crash.' Before every release, run the whole list. This notebook is the difference between an app that stabilises and one that wobbles forever.
Tricks and tips
- Screenshot or copy errors immediately — they vanish, and your memory of them is unreliable.
- When you and the AI are stuck after two attempts, change the question: paste the working simpler version and ask what differs.
- Never stack three fixes then test; you will not know which one worked — or which one broke it.
Practice task
Run a full hostile-user pass (Episode 3 list plus your regression list), log every bug with reproduction steps, and fix in priority order until the list is empty.
Pro level
- Pros separate 'fix now' from 'note and monitor': cosmetic issues get logged, crashes and data issues stop the release.
- A staging/preview copy for testing, separate from real users' version, is worth setting up the moment anyone else uses your app.
Free and cheap ways to do this
- Browser developer consoles and builder logs are free and already installed — learn to open them.
- Cursor and Copilot free tiers cover AI pair-debugging for small projects.
- Your regression list lives in a free notes doc — the tool is trivial, the habit is the asset.
Only legitimate free routes are listed here — official free tiers and trials, open-source tools, and student discounts. Cracking, piracy and payment workarounds are not recommended.