Debug and improve your app
When your app breaks, Lovable can help you fix it by understanding the problem, investigating the cause, and improving your app with careful changes. Instead of guessing, describe the issue clearly and use Lovable's tools to find and fix the real problem.
Anyone building an app with Lovable needs this when their app isn't working as expected or they want to make it better.
Do this, in order
- 1
If an error pops up, use the 'Try to fix' option once or twice.
This is a quick way to see if Lovable can immediately resolve the issue without much input from you.
- 2
If the error persists, clearly tell Lovable what is broken, where it's happening, what you expected to happen, and what actually happened.
Being specific helps Lovable understand the problem precisely. Attaching screenshots or error messages gives it more information to work with.
- 3
If the problem is stubborn, switch to 'Plan mode' and ask Lovable to find the underlying cause before trying more fixes.
Repeated quick fixes can hide the real problem. 'Plan mode' helps identify the root cause, leading to a more lasting solution.
- 4
If your code has become messy from many failed fixes, restore a previous working version from your project's version history or by reverting a past message.
Starting fresh from a known good state is often faster than trying to untangle complicated, broken code.
- 5
After fixing a difficult bug, ask Lovable to summarize the issue and its solution.
This adds to your project's knowledge, helping Lovable understand similar problems better in the future.
Paste this into your project
Here's what's happening: [Describe the bug clearly: what is broken, where, what you expected, and what happened]. Can you investigate the root cause of this problem in Plan mode and propose a solution? If you need more information, please ask.
Words decoded
- Plan mode
- A special way of interacting with Lovable where it focuses on analyzing and explaining problems or suggesting strategies, rather than immediately making code changes.
- Root cause
- The fundamental reason why a problem or error is happening, not just the symptom you see.
- Codebase audit
- A thorough check of your app's entire code to find ways to make it better organized, easier to understand, and more efficient.
- Performance check
- An analysis of your app to find out why it might be slow and how to make it run faster and smoother.
- Version history
- A record of all the changes made to your project over time, allowing you to go back to an earlier working version if needed.
Where people get stuck
- Don't use vague or frustrated prompts like 'Nothing works, fix it!' as Lovable needs specific details to help.
- Avoid blindly trying many fixes without understanding the problem, as this can make the code more complicated and harder to fix.
- Don't treat related problems as separate issues; a fix in one area might cause a new problem elsewhere, so ask about connections.
- Don't ignore the underlying reason for an error; a quick fix might silence a problem without addressing why it happened in the first place.
The short version, steps, decoder and prompt on this page are written automatically from Lovable's own documentation and can lag or misread it. The official page is always the authority.