Engineering

Capture Console Errors in Client Bug Reports Without Asking

Clients can't send you console errors, and they shouldn't have to. What those errors tell a developer and how to capture them with every bug report.

A browser with a console panel of red and amber bars and a speech bubble pinned to the page.
A practical field guide
In this article 7 sections

“The button in the basket does nothing.” You open the site, add a product, click the button: it works. You write back: “Could you open DevTools, go to the Console tab and send me what’s in red?” The reply takes two days and is a phone photo of a laptop screen, cut off halfway.

The information you needed was on the client’s screen the whole time. This post covers what console errors tell a developer, why clients cannot send them, and how to capture console errors with every bug report so nobody has to ask.

What console errors and warnings tell a developer

A line like this saves an hour of guessing:

Checkout failed: TypeError: Cannot read properties of undefined (reading 'price')

From one line you learn:

  • Which feature broke: checkout, not the button’s CSS.
  • What kind of failure it is: code expected an object and got nothing. Probably a product without a price, or data that did not load.
  • Whether it is your code: a message from your own error handling points to your code. A message from a chat widget or an analytics tag points somewhere else entirely.
  • When it happened: a timestamp next to the report’s time tells you whether the error came with the click or ten minutes earlier.

Warnings are quieter but useful too: a library announcing that a feature is deprecated, or a script complaining about a missing setting. On their own they rarely explain a bug. Next to an error, they often show what went wrong first.

Why clients cannot send them

Asking a client for console output fails for reasons that have nothing to do with the client:

  • DevTools are hidden. Most people have never pressed F12, and on a phone there is no console to open at all.
  • The moment is gone. By the time they read your email, they have reloaded the page and the error has disappeared.
  • They cannot tell what matters. A busy console holds dozens of lines. They screenshot the top, the error you need is at the bottom.
  • It costs a round-trip. Every “could you send me…” adds a day of waiting to a bug that may take ten minutes to fix.

A good bug report template asks clients for what they can give: what they did, what they expected, what happened. Technical context should come from the tool, not from the client.

How Zorko attaches console errors to every report

When a client sends a report through the Zorko widget, it carries the last 10 console errors and the last 10 console warnings from the page, each with its time. Next to them: the page URL, browser, operating system and device, window size, the pin’s exact position on the page, referrer, timezone and language.

The client does nothing extra. In the dashboard, the report’s Technical details section shows Console errors and Console warnings as two lists you can expand.

What it captures, and what it does not

Precision matters here, because an empty list should not mislead you.

Captured: messages the page’s code writes with console.error and console.warn, from the moment the widget loads (it loads on the visitor’s first mouse move, scroll, tap or key press). This covers the common pattern of catching an error and logging it, in your code and in libraries that report problems this way.

Not captured on its own:

  • an uncaught exception that the browser prints by itself (“Uncaught TypeError…”),
  • failed network requests and other messages the browser writes, not the page,
  • anything logged before the widget loaded.

You get the message text and the time, not a full stack trace. An object passed to console.error arrives as plain text, so when you log errors yourself, start the message with the feature’s name (“Checkout failed:”, “Newsletter signup:”). The first word then tells you which part of the site it is about.

Forward uncaught errors to the console

If you want uncaught exceptions in reports too, add a few lines to the site. They pass browser-level errors through console.error, where the widget sees them:

window.addEventListener('error', (event) => {
  console.error(`Uncaught: ${event.message} (${event.filename}:${event.lineno})`);
});

window.addEventListener('unhandledrejection', (event) => {
  console.error('Unhandled promise rejection:', event.reason);
});

In DevTools you will see those errors twice (the browser’s line and yours), which is harmless. Errors from scripts on another domain appear as “Script error.” unless the script is loaded with crossorigin and the right CORS headers.

How to read a report with console errors

  1. Compare the times. An error a few seconds before the report is a strong lead. One from long before may be unrelated noise.
  2. Match it to the pin. The pin and screenshot show what the client clicked. If the error names the same feature, you have your starting point.
  3. Reproduce with the same context. Same browser, same window size (it is in the report), same page URL.
  4. Treat an empty list as “no logged errors”, not “no bug”. Layout, content and CSS problems never touch the console, and uncaught exceptions only appear if you forward them as above.

Privacy: what ends up in the report

The widget reads the console of the page it runs on: messages from the site’s own code and the scripts that page loads. It does not record network traffic, cookies, keystrokes or other tabs.

One practical consequence: if your code logs personal data (an e-mail address, an order ID, a token), that line can end up in a report. That is a reason to strip such logs from production anyway. For the screenshot, clients have a blur tool to hide sensitive data before sending. Reports are stored in the EU; more on how we handle data.

Count it yourself

Look at last month’s bug reports from clients and note:

  • how many needed a follow-up question about the browser, the page or “any errors”,
  • how long each follow-up took to get an answer.

Say 8 bugs a month each needed one follow-up, and each follow-up cost a day of waiting plus 15 minutes of writing and reading: that is 8 days of bugs sitting still and 2 hours of email. An illustration, not a benchmark, but it is the part that disappears when the context arrives with the report.

If you are still comparing tools, console capture is one of the things worth checking, along with the rest of what to look for in a website feedback tool.

Get console errors with every client report, without asking: start free, one script tag, no credit card.

FAQ

Does the client have to open DevTools?

No. The widget collects the console messages in the background and attaches them when the client sends a report.

Does it work on phones?

Yes. Console capture runs in any browser the widget runs in, including mobile ones, where the client could not open a console even if they wanted to.

Does it capture errors from browser extensions?

Mostly not. Extensions usually run their scripts in a separate context, so their messages do not pass through the page’s console.

The console list is empty. Does that mean there is no bug?

No. It means the page logged no errors through console.error after the widget loaded. Check the screenshot, the browser and the window size, and consider forwarding uncaught errors as shown above.

Zorko news in your inbox

Product updates and practical tips for agencies, about once a month. Nothing else.

Put it into practice

Give clients the right way to show what they mean.

Zorko keeps screenshot and desktop video feedback together with the page details your team needs to act.

Start free See how it works

Free includes 1 project and 10 feedbacks a month. No credit card required.