Guides

How to copy console errors in Chrome for your AI agent

To copy console errors in Chrome for your AI agent, open the console, clear it, do the thing that breaks, then copy the red error lines as text and paste them into your agent's chat.

Updated

Many bugs leave no mark on screen. You click Save and nothing happens. The page looks fine, but behind it something threw an error. Your agent can't see that unless you hand it over, and the error text is often the single best clue to the cause.

Step by step in Chrome

  1. Open the console. Cmd+Option+J on a Mac, Ctrl+Shift+J on Windows. Or right-click the page, choose Inspect, and click Console.
  2. Clear the old messages. Click the clear icon (a circle with a line through it) at the top left of the console, so you only see what's new.
  3. Make the bug happen. Click the button, submit the form, whatever breaks.
  4. Find the red lines. Errors are red. Yellow ones are warnings and are usually less important.
  5. Copy as text. Select the error text with your mouse and copy it, or right-click the error and use the copy option in the menu. Click the small arrow next to an error first if you want the full stack, the list of files it went through.
  6. Remove secrets. Scan for tokens, keys and emails, and replace them with something like [hidden].
  7. Paste it with your note. Put it in its own block under what you expected.
Clicking Save on /settings does nothing. Expected: it saves.
Console:
TypeError: Cannot read properties of undefined (reading 'id')
    at saveProfile (settings.tsx:42)

Don't forget failed requests

Some bugs are a request to your server or database that came back with an error. These show in the Network tab, next to Console.

  1. Open the Network tab, then redo the action.
  2. Look for rows in red, or with a status of 400 or higher.
  3. Click the row. Copy the address, the status, and the Response text.

Not sure what a status means? The HTTP status code explainer says what 401, 404, 500 or 502 means in plain words and why it happens in common stacks.

Tips

Let Darnly keep the errors for you

The annoying part of all this is timing. You have to open the console before the bug happens, or do it again. Darnly, a free Chrome extension, keeps the last 60 seconds of console errors and failed requests on localhost all the time, so they're ready when you capture. On a live site, click Record errors on this site once and it does the same there.

When you see the bug, press Option+Shift+B (Windows is coming soon), click the broken part and say what you expected. The report has the errors and failed requests in it, next to a screenshot with the broken part boxed in red. Auth headers, cookies, tokens, API keys and secret-looking query parameters are replaced with [hidden] before anything is saved.

The error buffer stays in the page's memory and never leaves it unless you capture. The report goes into .darnly/inbox/ in your project for Claude Code, Codex or Cursor, or onto your clipboard if your project is in the cloud.

Questions

How do I open the browser console?

In Chrome, press Cmd+Option+J on a Mac or Ctrl+Shift+J on Windows. You can also right-click the page, choose Inspect, then click the Console tab.

Which errors should I copy?

The red ones that appeared right when the bug happened. Clear the console first, do the thing that breaks, then copy what shows up.

What about failed requests?

Open the Network tab, redo the action, and look for rows in red or with a status of 400 or more. Click one to see the address and the response, and copy those.

Is it safe to paste console logs into an AI chat?

Check them first. Logs and requests can hold tokens, API keys, emails or cookies. Replace anything secret before you paste.

Can Darnly record errors on my live site?

Yes, after you click Record errors on this site once for that site. On localhost it records straight away. On other sites it only sees failed requests the browser already lists.