Guides

How to fix a bug on a live site you built with AI

To fix a bug on a live site you built with AI, capture what you see with the page address and any console errors, try to make it happen on localhost, have your agent fix the code there, then redeploy and check the live page.

Updated

Your site is up, someone sends you a message, and something's wrong. Don't panic and don't start editing on the host's dashboard. Vibe coding debugging on a live site works best in a calm order. The fix happens in your project, the same way you built it. Here it is.

1. Capture the bug while you can see it

Write down the address, what you clicked, and what you expected. Take a screenshot and mark the broken part. Open the browser console (Cmd+Option+J on a Mac, Ctrl+Shift+J on Windows), redo the action and copy any red errors. The guide on copying console errors walks through it.

Also note the device. A bug on a phone may not show on a laptop. What browser am I using? copies your browser, screen size and settings in one go.

2. Check it's not the host

Some live-only bugs aren't in your code at all:

3. Try it on localhost

Start your app on your computer and repeat the steps. Two outcomes:

4. Fix, check, deploy

  1. Have the agent fix the code. Ask it to say in one line what it changed.
  2. Check it on localhost yourself, with the same steps.
  3. Commit and push, or deploy the way your host expects.
  4. Open the live page in a fresh window and try again. A hard reload (Cmd+Shift+R or Ctrl+Shift+R) skips the old cached files.

If the fix made things worse, git can take you back. The Git undo helper shows the right command for what went wrong.

Capture it in one key with Darnly

Step 1 is the bit that's easy to skip when you're in a hurry. Darnly is a free Chrome extension that does it in one move on any page, live or local. Press Option+Shift+B (Windows is coming soon), click the broken part, type what you expected.

On a live site, click Record errors on this site once. From then on Darnly keeps that site's console errors and failed requests from the last 60 seconds, ready for the next capture. Without that, it still includes failed requests the browser already lists for the page.

The report goes into .darnly/inbox/ in your local project, with the live address in it, so your agent works on the code on your computer. If your project lives in the cloud, copy the picture and details into your agent's chat instead, or use Darnly's optional cloud inbox.

One limit to know: on localhost Darnly can sometimes name the component and file that drew an element. On a live, built site it can't, because that information is gone after the build. The selector, text, styles and errors still help the agent find it.

Questions

Can I fix a live site directly?

You fix the code in your project, then deploy again. Most hosts used for AI-built sites, like Vercel, Netlify or Cloudflare, redeploy when you push to your main branch.

Why does the bug only happen on the live site?

Common reasons: a missing environment variable on the host, a different database, an API address that still points at localhost, caching, or a build step that behaves differently from the dev server.

Why are errors on my live site hard to read?

Live sites ship squashed (minified) code, so file and function names in errors are short and unclear. The error message itself is still useful to your agent.

Do I need to fix it on localhost first?

It's the safest way. Try to make the bug happen on localhost, fix it there, check it, then deploy. If it only happens live, tell your agent that, because it points to settings rather than code.

Does Darnly work on live sites?

Yes. Capturing works on any page. To include console errors from a live site, click Record errors on this site once for that site.