The single biggest thing separating people who ship with Lovable from people who quit is not talent — it's how they react to red screens. This lesson is a small kit of habits for when things break: how to read what the app is telling you, how to describe it back to the agent, and how to escape the moments when the agent gets stuck.
Part 1 · Errors are information, not failure
A red screen is not the site saying "you broke it". It's the site saying "here is the exact line where I don't understand what to do". That's a gift. The alternative — the button silently doing nothing — is much worse, because now you have to guess where the problem is.
Part 2 · Reading a red screen
Every error message has three parts. Once you can spot them, none of it is scary anymore — it's just a report.
Two places errors show up
- Preview overlay — the big red box in the app itself. Usually a runtime error: something crashed while the page was running. Look here first.
- Build errors — surface in the chat when the code can't even compile. Usually a typo, a missing import, or a mismatched tag. These block the preview entirely.
- Browser console — for issues that don't crash but still misbehave (a fetch that 404s, a warning about a missing key). Open dev tools, look for red text.
Part 3 · Talking to the agent about a bug
"It's broken, fix it" gives the agent nothing. A good bug report has three lines: what you did, what you expected, what you got. That's it — three lines beat three paragraphs every time.
- 1Reproduce
Do the exact clicks again. Confirm it happens every time, not just once.
- 2Describe
What you did, what you expected, what you saw. Attach the screenshot.
- 3Constrain
Tell the agent what NOT to change. "Fix only the submit handler."
- 4Verify
Repeat the reproduction steps. If the same click now works, you're done.
"On/contact, submitting the form with a valid email throwsTypeError: Cannot read properties of undefined (reading 'name')inContactForm.tsx. Expected: the success card. Only fix the submit handler — don't touch styling or fields."
What NOT to say
- "It doesn't work" — say what specifically doesn't work.
- "Fix everything" — you'll get sweeping changes and lose the parts that were fine.
- "Rewrite the page" — you almost never need this. Ninety percent of bugs are one line.
Part 4 · Rolling back with history
Every message in Lovable is a checkpoint. If a change broke the app and you can't see the fix, don't dig — revert. Go back to the last version that worked and re-approach the problem. This is the single most underused feature by beginners.
When to revert vs. patch forward
- Revert when the last 1–3 turns clearly broke something that used to work. Cheaper to start that turn over than to unwind it.
- Patch forward when the broken thing is a small, isolated new feature you can describe precisely.
- Always revert if the app won't even load. Debugging a blank screen with no preview is a bad trade.
Part 5 · Escaping stuck loops
Sometimes the agent tries a fix, it doesn't work, it tries again, and the same error keeps coming back. This is a loop, and continuing to say "still broken, try again" almost never breaks out of it. You need to change the shape of the problem.
Signs you're in a loop
- The same error message appears after three fix attempts.
- The agent starts editing files unrelated to the bug.
- Each fix reintroduces a bug from two turns ago.
- You've said "still not working" more than twice in a row.
Four moves that break loops
- Revert first — undo the last 1–3 turns, then re-prompt with a cleaner description.
- Narrow the scope — "Fix only the submit handler in ContactForm.tsx. Don't change anything else."
- Change the approach — "The current approach isn't working. Try a different one: validate on the server instead of in the component."
- Split the task — break it into two small prompts instead of one big one. Small prompts fail less.
"The last three attempts didn't fix this. Please revert to the working version, then take a different approach: instead of adding checks inside the component, add a Zod schema and validate before the insert."
Debugging cheat sheet
Five habits that turn "everything is broken" into "one line is broken, and I know which line".
- Read before you type — the error names the file and the line. Read it, screenshot it, send it.
- Reproduce, expect, see — three-line bug reports beat three-paragraph ones every time.
- Constrain the fix — tell the agent what NOT to change, not just what to change.
- Revert is not defeat — it's the single fastest debugging tool you have.
- Break loops early — after three failed fixes, change the shape of the request, don't repeat it.
Sign up with my invite link and Lovable will drop 10 bonus credits into your account — enough to try everything in this course.
Claim 10 credits