When something breaks in your generated app, you have three reliable shortcuts — no need to hunt through files yourself. The AI reads your code, so it can find and fix the cause from a short description.
Three ways to report a bug
- Paste the error. Drop the stack trace or console message into the chat; the AI opens the file at the right line and proposes a fix.
- Point at a file. "There's a bug in
orders.controller.jswhen status is null." - Describe the symptom. "The cart total is wrong when discount codes are stacked." The AI traces the data flow and patches the right places.
Give it what it needs
- The exact error text, copy-pasted — not a screenshot.
- What you did right before it broke.
- Expected vs. actual — "should show 3 items, shows 0".
- Any relevant IDs or inputs that trigger it.
Converge in a couple of rounds
- If the first fix isn't quite right, reply with what you now observe — "still crashes, but with a different error: …" — not just "didn't work".
- The AI keeps the previous turn plus the latest file state, so you usually land it in two or three rounds.
- If it drifts, roll back to before the fix and try a more specific description.
Preventing bugs in the first place
- Ask a Testing agent to add tests for critical flows so regressions surface early.
- Request input validation up front — "validate the checkout form and show clear errors".
- Keep changes small; a bug in a tight edit is far easier to trace than in a giant one.
Common mistakes to avoid
- Describing the fix instead of the problem. Tell the AI what's wrong and let it choose the fix.
- Pasting a screenshot of an error. Paste the text — the AI can't copy from an image reliably.
- Piling new features onto a broken build. Fix first, then continue.
FAQ
What if I don't understand the error?
Paste it anyway — the AI explains what it means and fixes it. You don't need to diagnose it yourself.
The fix made a new problem — now what?
Reply with the new error; the AI carries the context forward. If it's tangled, roll back and re-describe the original bug more precisely.
Can it fix bugs in imported code?
Yes — it treats imported projects the same way. @-mention the file in the desktop editor to focus it.