---
title: "Save console output with the lines a maintainer needs | Proofline"
description: "A screenshot of the console shows the last error."
url: https://proofline.sh/learn/console-log-evidence/
---

[Learning center](/learn/)

# Save console output with the lines a maintainer needs

A screenshot of the console shows the last error. The maintainer usually needs the lines before it, in order, with times, and including messages Chrome hides by default. Four settings change what a saved console shows.

Broken dependencies The Proofline team November 22, 2026 3 min read

## Set the console before you reproduce

In Chrome DevTools, change these before the failing step, not after:

| Setting | Where | Why it matters |
| --- | --- | --- |
| **Preserve log** | Console settings | Keeps messages across navigations and reloads. Without it, a redirect or a reload clears the lines that led up to it. |
| **Show timestamps** | Console settings | Puts a time on each line, so the maintainer can line it up with requests and server logs. |
| Log level **Verbose** | The levels menu next to the filter | Shows `console.debug` messages, which the default levels hide. Many libraries log their state at debug level. |
| **Selected context only** off | Console settings | Includes messages from iframes and workers, not only the top page. |

[Chrome DevTools: Console reference](https://developer.chrome.com/docs/devtools/console/reference)

Then reproduce, and right-click in the console to **Save as…**, which writes the visible messages to a text file. Copying from the console works too, but check that the copy kept the timestamps.

## Expand the error before you save it

A collapsed error shows its message and the first stack frame. The saved file shows what was visible. Expand the error so the whole stack is included, and expand any logged objects the maintainer will need, because a collapsed object saves as a one-line summary.

Chrome also evaluates a logged object when you expand it, not when it was logged. If the page changed the object afterward, the expanded view shows the later value. The small **i** icon beside an expanded object says so. When a value at the time of logging matters, log a copy such as `JSON.stringify(value)`.

## Include warnings and network errors

Turn on the warnings and errors that are not from `console.*` calls:

-   **Log XMLHttpRequests** adds a line for each XHR and fetch, which shows the order of requests among the messages.
-   **Violation** warnings, such as long tasks and forced reflows, appear at Verbose level. They matter for [a page that freezes](/learn/page-freezes-after-click/).
-   Network failures such as `net::ERR_BLOCKED_BY_CLIENT` appear as errors even with no script involved. [A request with no status code](/learn/failed-request-no-status/) lists what each one means.

## Capture the console from a script

When the reproduction is a Playwright script, collect the messages with their location:

```
page.on('console', msg => {
  const { url, lineNumber } = msg.location();
  console.log(new Date().toISOString(), msg.type(), msg.text(), `${url}:${lineNumber}`);
});
page.on('pageerror', err => console.log(new Date().toISOString(), 'pageerror', err.stack));
```

`pageerror` reports uncaught exceptions, which the `console` event does not. [Playwright: Page events](https://playwright.dev/docs/api/class-page#page-event-console)

A [Playwright trace](/learn/playwright-trace-bug-report/) records console messages alongside each action, so a trace makes a separate console file unnecessary.

## Worked example: the warning that came first

This example is fictional. A tester reports _TypeError: Cannot read properties of undefined (reading 'items')_ on the cart page and attaches a screenshot of that error.

The developer asks for the console saved with **Preserve log**, timestamps and Verbose. The saved file shows three lines the screenshot did not:

```
14:02:11.204 [debug] cart: restoring from storage (schema v2)
14:02:11.207 [warn]  cart: unknown schema v2, expected v3; using defaults
14:02:11.389 Uncaught TypeError: Cannot read properties of undefined (reading 'items')
```

The cart's stored schema was older than the code expected. The error was the third symptom of a migration that never ran. The developer [seeded a v2 cart in local storage](/learn/seed-local-storage-indexeddb/) and the error replayed.

## Questions

### Does Firefox save the console the same way?

Firefox's Web Console has its own options to persist logs and show timestamps, and can export the messages to a file or the clipboard. The settings live in different menus, so check them before reproducing.

### The console is full of messages from extensions. Should I remove them?

Filter them out of what you send if they are clearly unrelated, and say that you did. If the bug might involve an extension, keep them, and see [Works in incognito](/learn/works-in-incognito/).

### Can console logs contain secrets?

Yes. Applications sometimes log tokens, user objects or request bodies. Read the file before sharing it.

Return to [reproducing what someone else saw](/learn/replay-browser-bug-report/) for the other layers a replay needs.

## One month of free code review.

New organizations get one calendar month of hosted code review for private and public GitHub repositories. No card or cloud connection required. [Eligibility and fair-use terms](/free-code-review/).

[Start free with GitHub](https://proofline.sh/orgs/plan?offer=free_month)

## Related reading

-   ### [Send a Playwright trace when a video cannot answer the question](/learn/playwright-trace-bug-report/)
    
    Network outages The Proofline team November 22, 2026 4 min read
    
-   ### [A request with no status code: read (failed), (canceled) and (blocked)](/learn/failed-request-no-status/)
    
    Network outages The Proofline team November 20, 2026 4 min read
