When Something Breaks
When you hit a bug, tell the agent to enter debug mode. The agent will add console logs throughout the relevant code, and then you reproduce the broken flow on your device. The logs give the agent real output to inspect — making it much easier to pinpoint what’s broken and where. Here’s the prompt:“Enter debug mode: add logs wherever necessary, I will redo the broken flow on my device so the logs appear for you to inspect. Giving more insight into what’s broken and where the bug is.”
The Flow
- You prompt debug mode. Tell the agent what’s broken and ask it to add logs.
- The agent adds logs. It reads through the relevant code and places console logs in the areas that matter.
- You reproduce the bug. Redo the broken flow on your device so those logs fire.
- The agent inspects and fixes. With real log data, the agent can see exactly where things went wrong and apply the fix.
Give Context
The more you tell the agent about the problem, the better it knows where to place logs. Include:- What’s broken — what you see happening (or not happening).
- What you expected — what should have happened instead.
- Any extra context — when it started, what changed recently, or any error messages you see.
“Enter debug mode. The contact form stopped submitting after we added the new header. Add logs to the form submission flow — I’ll try submitting again and share what comes back.”
“Debug mode. The checkout page crashes when I click pay. Here’s the error I’m seeing: [paste error]. Add logs around the payment flow so I can reproduce and get more detail.”
Use Screenshots with Markers
If the bug is visual, take a screenshot and mark the problem area with a red circle or arrow. Upload it with your debug prompt:“The section I circled in red is overlapping the footer. Enter debug mode and add logs — I’ll reload the page and share the output.”A marked screenshot removes all ambiguity — the agent can see exactly what you’re looking at. Use any basic markup tool (your phone, Preview on Mac, Paint on Windows, or any screenshot tool) to draw on the screenshot before uploading.
Share Error Messages
If you see an error message — in the preview, in a popup, or in your browser’s developer console — paste it directly into your prompt. Error messages help the agent know exactly where to place logs and often point straight to the root cause.
“I’m getting this error when I submit the form: TypeError: Cannot read property 'email' of undefined. Enter debug mode, add logs around this, and I’ll reproduce it.”
Tips
- Say “debug mode.” This signals the agent to investigate thoroughly — read the code, add logs, and prepare for you to reproduce the issue.
- Mention what changed. If something broke after a recent edit, say so. It helps the agent place logs in the right spots.
- One bug at a time. If you have multiple issues, debug them in separate prompts. This keeps the logs focused and leads to cleaner fixes.
- Always share the log output. The whole point of debug mode is the back-and-forth — the agent adds logs, you reproduce, and the logs reveal the problem.
- Don’t worry about being technical. You don’t need to understand the code. Just describe what’s wrong, reproduce the flow, and paste what you see.

