Lesson 11 of 16 · 45 min suggested practice

Debug and test a Lovable app with clear evidence

Reproduce failures, choose the right verification method, and avoid repeated broad fixes that make the cause harder to find.

By Ashley Kays · Reviewed November 19, 2026 · Independent learning guide

The answer: A useful bug report states where the issue occurs, the user state, exact steps, expected behavior, and actual behavior. Use browser testing for complete user journeys and focused automated tests for important rules. Investigate recurring failures before requesting another broad rewrite.

Write a reproduction someone else can follow

Suppose Resource Shelf's saved count says two while the saved-list page shows one item. Record the starting state, which resources you saved, whether you refreshed, the URL, and the visible result. Include a screenshot if it clarifies the mismatch and the exact non-sensitive error if one appears.

Separate expected from actual behavior. 'It is broken' gives little direction; 'saving the same resource twice increases the count but creates one card' identifies a likely duplicate-handling problem. Keep the report focused on what you observed without inventing its cause.

Choose a test that answers the question

Lovable supports browser testing, frontend tests, and edge-function verification. Browser testing is appropriate for search-to-detail-to-download navigation and login flows. A focused automated test can protect a rule such as combining search with a topic or preventing duplicate saved IDs.

For a server action, inspect the request, permission check, response, and error behavior. Ask explicitly for edge-function tests when those rules need coverage. A passing component test does not prove a live download URL works, and a screenshot does not prove persistence across a refresh.

Investigate persistent failures before another fix

After a small number of unsuccessful attempts, switch to Plan and ask for the root cause, supporting evidence, and approaches already tried. For the saved-count example, inspect the storage format, state updates, duplicate filtering, and how the count is calculated.

Implement the smallest fix that addresses the cause and verify the original reproduction plus a related case. If the change affects filtering, recheck reset and no-results behavior. Record what was actually tested instead of treating a tool's success message as a complete test report.

Use history carefully and keep a regression note

Bookmark a known-good version before a large change. Version history can help restore code, but current documentation warns that reverting does not undo database data changes or migrations. Plan data recovery independently when the optional backend is involved.

After fixing the issue, write a short note: symptom, cause, change, and verification. Add an enduring product rule to project Instructions if it would prevent recurrence. Keep the test suite focused on meaningful behavior; a small reliable check is more useful than many tests that simply repeat the implementation.

Try this focused prompt.

Investigate this Resource Shelf bug before editing: saving the same resource twice increases the saved count, but the saved list shows only one card. Expected: one resource is counted once. Reproduce it, inspect storage and state updates, and explain the root cause with evidence. Implement the smallest fix and add a focused rule test if useful. Verify repeated saves, remove, refresh, stale IDs, and the original reproduction. Report actual test outcomes.

Replace the sample context with your own approved facts. Review Lovable’s proposed changes before accepting them.

Evidence before the next step

Check your work.

  • A second person could reproduce the issue from your report.
  • Verification matches the type of failure.
  • The fix passes the original case and relevant adjacent behavior.

Your checkmark stays in this browser. It records your own progress, not a certification.

Official sources & further reading

Reviewed November 19, 2026. Plans, terminology and interfaces can change; follow the linked documentation if your workspace differs.