To see output from headless Chrome, choose the stream that matches the problem. For an interactive session, start Chrome with a remote debugging port and connect from a visible Chrome window at chrome://inspect. For automated tests, attach Puppeteer console and pageerror listeners before navigation. If Chrome itself will not launch or crashes, enable Puppeteer’s dumpio option.
Choose the diagnostic route
| Need | Use | What you get |
|---|---|---|
| Inspect a live page interactively | Chrome remote debugging plus chrome://inspect |
A DevTools window with Console, Sources and other panels |
| Record messages in an automation log | Puppeteer page.on('console') |
Messages emitted by page JavaScript |
| Capture uncaught JavaScript exceptions | Puppeteer page.on('pageerror') |
Exceptions that escape page code |
| Diagnose browser launch or crash output | Puppeteer dumpio: true |
Chrome process logs forwarded to Node.js streams |
| Investigate network failures | requestfailed plus response inspection |
Transport failures separately from HTTP status codes |
These streams are different. A page exception is not a Chrome-process failure, and a 404 or 503 response is not automatically a failed request in Puppeteer.
Open DevTools for a running headless Chrome target
1. Start Chrome with remote debugging
Run Chrome or Chromium with a remote debugging port. Port 0 tells Chrome to select an available port and print its DevTools WebSocket endpoint:
chrome --headless --remote-debugging-port=0 https://developer.chrome.com/
Keep the terminal running. Copy the address and port shown in standard output. The headless process does not grow a visible DevTools window by itself; a separate, headful Chrome instance connects to it.
#1 Best Overall
- CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
- WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
- A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents
2. Connect from a visible Chrome window
- Open Chrome normally (not headless) and enter
chrome://inspectin the address bar. - Select Configure.
- Enter the host and port printed by the headless process, then confirm.
- Find the remote page under available targets and select Inspect.
DevTools opens against the live headless target. Use the Console to run expressions, expand stack traces and follow source links. This route is useful when you need context that a text transcript omits, such as the current DOM, loaded sources or network activity.
Preserve and filter messages
Console severity filters let you show Verbose, Info, Warning or Error entries. Enable Preserve log when navigation would otherwise clear earlier messages. Use the source link on an error to jump to the originating script and inspect its stack.
Protect the debugging endpoint
A remote debugging endpoint should remain local or otherwise access-controlled in the environment where Chrome runs. Do not expose it broadly just to make inspection convenient. The connection mechanics above do not provide a complete network-hardening configuration; apply the controls required by your runtime.
Capture page console output in Puppeteer
Browser JavaScript and Node.js run in separate contexts. A page’s console.log() therefore does not automatically appear in the Node terminal. Register a listener before goto() or before the interaction that may emit the message.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →import puppeteer from 'puppeteer';
const browser = await puppeteer.launch();
const page = await browser.newPage();
page.on('console', msg => {
console.log(`[page console:${msg.type()}]`, msg.text());
});
page.on('pageerror', error => {
console.error('[uncaught page error]', error);
});
await page.goto('https://example.com');
// Run interactions that may trigger messages here.
await browser.close();
The event supplies a Puppeteer ConsoleMessage. msg.text() gives the rendered message text, while msg.type() commonly identifies categories such as log, warn and error. Attach the listeners before navigation so messages emitted during document loading are not missed.
Rank #2
- CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
- SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
Capture values and timing carefully
Log arguments can be richer than one string. The text form is convenient for a transcript, but object-heavy diagnostics may need additional inspection through Puppeteer’s ConsoleMessage API. Record a timestamp or URL in your own logger when correlating output from multiple pages, and close the browser in a finally block in production code so failures do not leave orphaned processes.
Capture uncaught page exceptions separately
pageerror represents an uncaught exception in page JavaScript. It is a different stream from console.error(): code can print an error without throwing, and it can throw without writing a console message. Keep both listeners when diagnosing application failures.
page.on('console', msg => {
const line = `${new Date().toISOString()} [${msg.type()}] ${msg.text()}`;
process.stdout.write(line + 'n');
});
page.on('pageerror', error => {
process.stderr.write(`${new Date().toISOString()} [pageerror] ${error.stack || error}n`);
});
Install these handlers before page.goto(), clicks, form submissions or script evaluation. If you add them afterward, an earlier error has already occurred and cannot be replayed.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Forward Chrome’s own process logs
Page listeners observe events generated inside the web page. They do not explain every launch, sandbox or browser-process problem. When Chrome fails to start, exits unexpectedly or crashes, pass dumpio: true to Puppeteer:
const browser = await puppeteer.launch({ dumpio: true });
Puppeteer forwards the browser process’s standard output and error streams to Node’s standard streams. Use this alongside page listeners when the symptom is a browser startup or process failure. If Chrome never creates a page, page-level events cannot provide the missing evidence.
Rank #3
- Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
- Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
- Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
- In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
- Ultra-thin bezels: Maximize your viewing experience with thin bezels.
Distinguish JavaScript, network and HTTP errors
Request failures
Listen for requestfailed when the request fails at the network or transport layer:
page.on('requestfailed', request => {
console.error('request failed:', request.url(), request.failure());
});
HTTPRequest.failure() may include text such as net::ERR_FAILED, but Puppeteer does not guarantee that failure text will be present.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallHTTP error responses
A server response with status 404 or 503 is still a completed request. It does not trigger requestfailed merely because the status is an HTTP error. Inspect responses and status codes independently:
page.on('response', response => {
if (response.status() >= 400) {
console.error('HTTP status:', response.status(), response.url());
}
});
Use the page console and pageerror for application behavior, requestfailed for transport problems, and response status checks for server-side 4xx/5xx results.
A complete diagnostic script
The following script wires all relevant streams before loading a URL. It records page messages, uncaught exceptions, failed requests, HTTP errors and browser-process output:
Rank #4
- CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
- SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
- MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
- KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
- INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient
import puppeteer from 'puppeteer';
const browser = await puppeteer.launch({ dumpio: true });
try {
const page = await browser.newPage();
page.on('console', msg => {
console.log(`[console:${msg.type()}] ${msg.text()}`);
});
page.on('pageerror', error => {
console.error('[pageerror]', error.stack || error);
});
page.on('requestfailed', request => {
console.error('[requestfailed]', request.url(), request.failure());
});
page.on('response', response => {
if (response.status() >= 400) {
console.error('[http]', response.status(), response.url());
}
});
await page.goto('https://example.com', { waitUntil: 'networkidle2' });
// Add clicks or other actions whose output you need to observe.
} finally {
await browser.close();
}
The exact Puppeteer API is rolling; the documentation reviewed identified version 25.11.0, so verify the currently published version before relying on version-specific details.
Troubleshooting missing or misleading output
No page logs appear in Node
- Confirm the listener is attached before
goto()or the triggering action. - Check that the message is emitted by the page, not by Node or a worker you are not observing.
- Ensure your logger is not filtering the message type.
Errors vanish after navigation
When using DevTools, turn on Preserve log. In Puppeteer, write events to a persistent Node stream and include the page URL or timestamp so a navigation does not hide their origin.
Only a 404 is visible
Check the response status explicitly. A 404 is not a requestfailed event, so relying only on that event misses completed HTTP error responses.
Chrome will not launch or closes immediately
Use dumpio: true and inspect Node’s standard error output. This targets browser-process diagnostics; adding more page listeners cannot help if no page was created.
The remote target is not listed
Verify that the headless process is still running, that you entered the host and dynamically selected port printed by Chrome, and that the headful Chrome instance can reach that address. Keep the endpoint local or protected.
Free tools Windows power users keep installed
One-click scans. No signup required.
Best Value
- 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
- 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
- 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.
Output is incomplete during startup
Move every listener above page.goto(). Messages emitted while scripts initialize occur before code that attaches a later listener.
Or skip the browser setup
When your goal is a clean screenshot rather than interactive console diagnosis, ScreenshotNeo provides a one-request website screenshot API and MCP server. It accepts consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups and chat widgets before capture; each step can be turned off. Bot checks, CAPTCHAs, blank pages, timeouts, failed loads and cache hits cost nothing, and the response identifies the result with X-Page-Verdict and X-Billed headers. Its MCP tools—take_screenshot, get_page_info and capture_pdf—work with Claude, Cursor and other MCP clients.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo API documentation for all options. The same endpoint supports PNG, JPEG or WebP, full-page and element captures, device presets, retina scale, PDF settings, custom CSS and JavaScript, clicks, selector or network-idle waits, request blocking, headers, cookies, user agents, timezone, geolocation, transparent backgrounds, resizing, chosen cache TTLs, signed links, asynchronous webhooks, bulk capture of up to 100 URLs per call, usage data and an OpenAPI specification. Parameter names used by other screenshot APIs also work, easing migration.
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
The Free plan includes 1,000 screenshots each month without a card. Paid plans start at $5 for 3,000 shots; every feature is included on every plan. Sign up free for ScreenshotNeo.
Recommended Free Tools
Practical operating checklist
- Decide whether you need interactive DevTools, page output, uncaught exceptions, browser-process logs or network evidence.
- Attach Puppeteer listeners before navigation and interactions.
- Use
dumpioonly when browser-process diagnostics are relevant. - Inspect response status codes separately from
requestfailed. - Preserve DevTools logs across navigation when investigating startup behavior.
- Keep remote debugging endpoints local or access-controlled.
Frequently Asked Questions
Does headless mode hide all console output?
No. The page still emits console events; headless mode simply has no visible DevTools window. Forward events with Puppeteer or attach a visible DevTools client through remote debugging.
What is the difference between console.error and pageerror?
console.error is an explicit message written by page code. pageerror reports an uncaught page exception. Capture both when diagnosing JavaScript failures.
Will requestfailed tell me that an API returned 500?
Not by itself. A 500 is a completed HTTP response, so inspect response status codes separately; requestfailed is for network or transport failure.
Quick Recap
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.

