Skip to content
midgeDocs
Browser DevToolsHow to export console logs in Chrome
Browser DevTools

How to export console logs in Chrome

How to export console logs in Chrome: preserve the log, show all levels, save as a .log file or copy them, and check for secrets before sharing.

To export console logs in Chrome, open the Console with Ctrl+Shift+J (Cmd+Option+J on Mac), reproduce the problem, then right-click an empty area of the Console and choose Save as…. Chrome saves all current messages to a plain-text .log file. If you would rather paste the logs into a ticket, choose Copy console from the same menu instead.

Two settings make the export far more useful: turn on Preserve log so messages survive page reloads and redirects, and enable Verbose in the Log Levels drop-down so debug messages are included. Set both before you reproduce the problem, not after. The steps below follow Chrome’s DevTools documentation; labels can change between Chrome versions, so pick the closest match if something reads differently.

Step 1: Open the Console

Go to the page where the problem happens and open DevTools on the Console panel:

  • Press Ctrl+Shift+J on Windows and Linux.
  • Press Cmd+Option+J on Mac.
  • Or open DevTools any other way (F12, or the three-dot menu, then More tools, then Developer tools) and click the Console tab.

If you already have DevTools open on another panel, press Escape to show the Console in the drawer at the bottom. That is handy when you want to watch the Network panel and the Console at the same time.

Step 2: Turn on Preserve log

By default, the Console clears whenever a new page loads. If the error happens right before a redirect, such as after submitting a sign-in form, it disappears before you can save it.

  1. Click the Console Settings gear in the top-right corner of the Console. It is not the main DevTools Settings gear; the Console has its own.
  2. Check Preserve log.

While the settings are open, two more options are worth knowing:

  • Log XMLHttpRequests logs every XHR and fetch request to the Console as it happens. It helps you see which API call came right before an error.
  • Show CORS errors in console makes sure cross-origin errors are printed. If a request fails because of CORS, this is where you see it.

If you want each message stamped with a time, open DevTools Settings, go to Preferences, and in the Console section check Show timestamps. Timestamps make it much easier to line up console messages with server logs or a screen recording.

Step 3: Show every log level

Chrome groups console messages into four levels: Verbose, Info, Warning and Error. console.log() and console.info() are Info, console.error() is Error, warnings are Warning, and console.debug() is Verbose. Chrome’s documentation tells you to enable Verbose if it is off, and in a default setup it usually is.

Open the log levels drop-down in the Console toolbar (it reads Default levels until you change it) and make sure all four levels are checked. For a bug report, more is better: a warning logged a second before a crash is often the real clue.

Also clear the filter box and check that no sidebar filter is active. If you only show errors while reproducing, the saved file may contain only what is visible.

Step 4: Clear and reproduce

Clear old messages so the file only contains what matters. Click the Clear console button in the toolbar, or press Ctrl+L on Windows and Linux or Cmd+K on Mac.

Then reproduce the problem. Reload the page if the error happens during loading, or repeat the clicks and form submissions that trigger it. Wait until the error appears.

Expand the important errors by clicking the arrow next to them. The Console captures stack traces for errors and warnings automatically, and the stack trace tells a developer which file and line threw the error.

Step 5: Save as a .log file or copy

Right-click an empty area of the Console (not on a message) to open the context menu:

  • Save as… saves all current messages to a plain-text .log file. Chrome asks where to save it.
  • Copy console copies all current messages to the clipboard, but not the history of commands you typed.

Name the file so it is easy to identify later, for example checkout-error-console-2026-11-10.log. Open it in a text editor to check that it contains the error you saw. If a message you care about is missing or cut short, right-click that message and copy it on its own, or take a screenshot of the expanded stack trace and attach it too.

To copy a single value printed to the Console, right-click it. Chrome offers Copy string contents, Copy as JavaScript literal and Copy as JSON literal for strings.

Filtering before you share

If the Console is noisy, filters help you find the relevant part. They also change what you see, so be careful about exporting a filtered view by accident.

  • Type text or a regular expression such as /payment|checkout/ in the filter box to show matching messages.
  • Type url: followed by a script URL to show messages from that script only, or -url: to hide them.
  • Open the Console sidebar and click User messages to hide messages the browser itself generated.
  • Check Selected context only in Console Settings to hide messages from iframes, such as ads or embedded widgets.

When you are done looking, remove the filters before saving if the developer should see the full log.

What to look for in a console log

Some messages show up again and again in bug reports. Knowing them helps you write a better summary:

Uncaught TypeError: Cannot read properties of undefined (reading 'total')
    at renderSummary (checkout.js:214:31)
    at onCartLoaded (checkout.js:88:5)

An uncaught exception with a stack trace. The first line says what went wrong, the next lines show where.

Failed to load resource: the server responded with a status of 500 (Internal Server Error)

A request failed on the server. The matching request in the Network panel has the details; see how to capture network traffic in Chrome.

Access to fetch at 'https://api.example.com/v1/cart' from origin 'https://shop.example.com'
has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

A CORS error. The browser blocked the response because the server did not allow the page’s origin.

Uncaught (in promise) Error: Request failed with status code 401

An unhandled promise rejection. Something rejected and nothing caught it, which often means a button “does nothing” with no visible error.

Check for private data first

Console logs are written by developers, and developers sometimes log more than they should: access tokens, full user objects, emails, or entire API responses. Before you attach a log file to a ticket:

  • Search the file for token, Bearer, password, eyJ (the start of most JWTs) and @ (emails).
  • Replace any values you find with REDACTED.
  • If you find a token and want to know what is inside before deciding, the JWT decoder shows its claims in your browser without uploading it.

If the support team also asked for network data, read how to get a HAR file; HAR files need the same cleanup, which the HAR sanitizer can do for you.

Capture console logs without DevTools

The steps above work, but they depend on someone having DevTools open at the right moment. Midge, a free Chrome extension, keeps recent console output in memory for each tab, so an error that happened before you pressed record still ends up in the report, next to the screen recording and the network requests. Every recording includes console logs, network requests, user actions and device info. Passwords, card numbers, tokens and cookies are redacted in your browser before anything leaves your device. Read more on the console logs feature page.

Official documentation

The browser steps above were checked against these pages on November 10, 2026. Browser menus change between versions, so the official pages are the place to look if a label has moved.

Frequently asked questions

How do I save the Chrome console to a file?

Open the Console, right-click an empty area of it, and choose Save as. Chrome saves all current messages to a plain-text .log file.

Why are some messages missing from my export?

The Console clears on every page load unless Preserve log is on, and Verbose messages such as console.debug are hidden by default. Turn on Preserve log and enable Verbose in the Log Levels drop-down before reproducing.

How do I copy console logs instead of saving them?

Right-click an empty area of the Console and choose Copy console. It copies all current messages to the clipboard, but not the history of commands you typed.

Can console logs contain sensitive data?

Yes. Apps sometimes log tokens, emails, user IDs or whole API responses. Read through the file and remove anything private before you share it.