Debugging with the AI
Fix errors fast. Send an error to the AI, run the Doctor, describe bugs well, and revert when a change went the wrong way.
When something breaks, the AI is usually the fastest way to fix it. This page shows the tools and the prompts that work best.
One-click fixes
- Fix with AI: build errors show an overlay on the canvas. Choose Fix with AI to send the error to the chat.
- Fix in the chat: runtime and build errors also appear above the composer. Choose Fix to send them.
- Send all to AI: the Doctor and the security scan can send all their findings at once.
Run the Doctor
Type /fix and pick Doctor to detect and fix errors in your code. The Doctor checks your project for security, bugs, performance, accessibility, maintainability and complexity issues, and scores the result. Choose Fix with agent on a finding, or Send all to AI. See Doctor.
Describe a bug well
Say what you did
"I filled the booking form and clicked Send."
Say what happened and what you expected
"Nothing happened. I expected the success message."
Add evidence
Mention Problems with @, paste the error text from DevTools, or attach a screenshot.
Ask for the cause first when it is unclear
In Ask mode: "Explain why this happens. Don't change any code yet." Then fix it in Build mode.
Useful debugging prompts
The page is blank after my last change. Find the error in the console and fix it.This worked before the last change. Compare with the previous version,
find what broke, and fix only that.The layout breaks on phones below 400 px wide. Fix it without changing the
desktop layout.When to revert instead
If a change went the wrong way, going back is often faster than fixing forward:
- Choose Revert to this version on the version card before the change.
- Or edit your earlier message and choose Revert and resend with a clearer prompt.
See Version history.
When the chat itself has a problem
| Message | What to do |
|---|---|
| Connection Interrupted | Anything already done is saved. Send your request again. |
| Session Expired or Connection Problem | Choose Reconnect for your provider. |
| Conversation Too Long | Choose Start New Chat, or use /compact. |
| Usage Limit Reached or Credits Used | See Plans and credits, or switch to a connected provider. |
| Temporarily Overloaded | Wait a moment. The chat retries on its own. |
Preview not updating?
Reload the frame from its toolbar. If the development server stopped, the chat error offers Restart Dev Server.