Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
World desk4 min

How to Get Recent Browser Process Logs in Puppeteer

Use @puppeteer/browsers Process.getRecentLogs() for buffered browser output, or enable dumpio in puppeteer.launch() to forward stdout and stderr to Node.js.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a buffered list of recent browser output, use getRecentLogs() on the Process wrapper from @puppeteer/browsers. If your application launches Chrome with Puppeteer’s usual puppeteer.launch(), set dumpio: true to forward browser stdout and stderr to Node.js instead; that option does not provide a recent-log array.

Choose the log method that matches your launch API

Need Use What it gives you Important distinction
Read recent output from a browser process wrapper Process.getRecentLogs() from @puppeteer/browsers A string array of recent browser stdout and stderr lines This belongs to the browser-management package’s Process API, not the Browser object returned by puppeteer.launch(). Puppeteer LaunchOptions reference
See browser output as it is emitted by a Puppeteer launch puppeteer.launch({dumpio: true}) Forwards browser stdout and stderr to Node’s corresponding streams It is forwarding, not a buffered recent-log accessor; dumpio defaults to false. Puppeteer Debugging guide
Investigate Puppeteer’s internal protocol activity NODE_DEBUG="puppeteer:*" Internal protocol debug output This is a different log layer and may include sensitive information. Puppeteer Debugging guide

Get buffered recent logs with @puppeteer/browsers

Use this method when your code launches a browser through the Process wrapper exported by @puppeteer/browsers. The API documents getRecentLogs(): string[] as returning recent browser logs combining stderr and stdout. Process implementation and API source

As an Amazon Associate I earn from qualifying purchases.

import {launch} from '@puppeteer/browsers';

const process = launch({
  executablePath: '/path/to/chrome',
});

// Call this when you need diagnostics.
console.log(process.getRecentLogs().join('n'));

Replace /path/to/chrome with the installed browser executable path for your environment, and use launch options supported by your installed @puppeteer/browsers version. The returned value is an array of strings, so joining it with newlines makes it easier to read or send to a logger.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Buffer size and timing

The reviewed source implementation reads stdout and stderr line by line, ignores blank lines, and retains up to 1,000 nonblank lines. That is implementation behavior, not a documented cross-version guarantee; do not build an application requirement around the number 1,000. The method returns a copy of the current buffer, so call it after the event you are investigating or when handling the process lifecycle. Source implementation

Check that you have the right object

Do not call getRecentLogs() on the regular Browser value returned by await puppeteer.launch(). That is a different API. If your application uses puppeteer.launch(), use dumpio as described below, and collect Node’s output through your own logging infrastructure if you need persistent records.

Forward browser output from puppeteer.launch()

Set dumpio: true in the launch options to pipe browser stdout and stderr to the Node.js process’s corresponding output streams. The option defaults to false. LaunchOptions reference

Rank #2
Sale
HTML and CSS: Design and Build Websites
  • HTML CSS Design and Build Web Sites
  • Comes with secure packaging
  • It can be a gift option
import puppeteer from 'puppeteer';

const browser = await puppeteer.launch({
  dumpio: true,
});

try {
  const page = await browser.newPage();
  await page.goto('https://example.com');
} finally {
  await browser.close();
}

This lets you observe output while the browser runs, including during launch and runtime failures. To keep it, redirect or capture the Node process’s stdout and stderr using the process manager, container runtime, or logging system that runs your application. dumpio itself does not expose a recent-lines array.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use the debug namespace for the layer you are investigating

Puppeteer protocol traffic

For internal Puppeteer protocol diagnostics, the debugging guide documents NODE_DEBUG="puppeteer:*". This is not a substitute for browser process stdout and stderr. Debug output may contain sensitive information, so review it before sharing logs or storing them in a broadly accessible system. Debugging guide

Browser-management operations

For verbose operations from @puppeteer/browsers, use NODE_DEBUG="puppeteer:browsers:*". This namespace helps inspect browser-management activity such as launcher parameters and process state; it is distinct from the browser’s own stdout and stderr. Browser management documentation

Troubleshoot what the logs reveal

Process logs can help identify where a launch or runtime problem occurs, but they do not by themselves fix the environment. Match the error to the runtime and installation path rather than assuming every launch failure has the same cause.

Rank #4
Sale
Web Design with HTML, CSS, JavaScript and jQuery Set
  • Brand: Wiley
  • Set of 2 Volumes
  • A handy two-book set that uniquely combines related technologies Highly visual format and accessible language makes these books highly effective learning tools Perfect for beginning web designers and front-end developers
  • Browser executable is missing: check whether browser download or installation completed and whether the configured executable path exists. Puppeteer’s troubleshooting guide covers blocked dependency install scripts that can prevent automatic browser downloads. Troubleshooting guide
  • Launch behavior differs on Windows: check whether Chrome extension policies conflict with Puppeteer’s default launch arguments; the troubleshooting guide describes this environment-specific issue. Troubleshooting guide
  • Chrome fails in Google Cloud Run: verify that the runtime has the system packages Chrome needs. The troubleshooting guide specifically notes missing system packages in the default Node.js runtime as a possible cause. Troubleshooting guide
  • No recent lines appear: confirm the process has emitted output and that you are reading the @puppeteer/browsers Process object, not a Puppeteer Browser. For puppeteer.launch(), enable dumpio and inspect the Node process streams.
  • Logs are noisy or sensitive: use the narrowest relevant debug namespace and review output before sharing it. Protocol diagnostics can contain sensitive information. Debugging guide
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If your goal is a page screenshot rather than diagnosing a local Puppeteer launch, ScreenshotNeo provides a screenshot API and MCP server for developers. A single GET request can return an image or PDF; the call below requests a WebP screenshot. See the ScreenshotNeo API documentation for parameters and response details.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
  • Cookie banners and consent prompts, newsletter popups, and chat widgets are removed before capture; each cleanup step can be turned off.
  • Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed; response headers report the page verdict and billing status.
  • An MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents and MCP clients.
  • The Free plan includes 1,000 screenshots per month with no card required; paid plans start at $5 for 3,000 screenshots.

Sign up for ScreenshotNeo’s free plan to get 1,000 screenshots a month with no card.

Frequently Asked Questions

Can I call getRecentLogs() on the object returned by puppeteer.launch()?

No. It is an API on the Process wrapper from @puppeteer/browsers; for a normal Puppeteer launch, use dumpio: true.

Does dumpio save browser logs to a file?

No. It forwards browser output to Node’s stdout and stderr; use your runtime or logging system to persist those streams.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.