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 minutePC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Start a trace with page.tracing.start() before the page load or interaction you want to measure, perform that work, then call page.tracing.stop(). Give start() a file path to save the trace, or omit it and use the returned Uint8Array. Open the resulting trace in Chrome DevTools or the timeline viewer.
Capture a page load
After launching Puppeteer and creating a page, start tracing immediately before navigating. Stop tracing once the navigation has completed:
As an Amazon Associate I earn from qualifying purchases.
import puppeteer from 'puppeteer';
const browser = await puppeteer.launch();
try {
const page = await browser.newPage();
await page.tracing.start({ path: 'trace.json' });
await page.goto('https://example.com');
await page.tracing.stop();
} finally {
await browser.close();
}
This writes the trace to trace.json in the process’s current working directory. Puppeteer’s Tracing class documentation describes opening the resulting file in Chrome DevTools or the timeline viewer.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Capture an interaction instead of navigation
The trace brackets the work you want to inspect. For an interaction, start tracing after the page is ready but immediately before the action, then stop after the action and any relevant follow-up work finish:
#1 Best Overall
await page.goto('https://example.com');
await page.tracing.start({ path: 'interaction-trace.json' });
await page.locator('button').click();
await page.tracing.stop();
Starting too early includes unrelated loading or setup activity; starting too late misses the work under investigation. The documented API begins tracing for the current page, so use the page whose activity you intend to capture.
Save to a file or keep trace bytes in memory
The path option controls whether Puppeteer writes the trace to disk. With a path, stop() ends the capture after the file is written. Without a path, the stop result contains the trace as a Uint8Array, which you can pass to code that stores or processes binary data:
Rank #2
await page.tracing.start();
await page.goto('https://example.com');
const traceBytes = await page.tracing.stop();
// traceBytes is a Uint8Array; write or upload it with your preferred storage API.
For example, in Node.js you can write the bytes with the built-in filesystem module:
import { writeFile } from 'node:fs/promises';
await writeFile('trace.json', traceBytes);
See Puppeteer’s TracingOptions reference for the currently documented return behavior and available options.
Choose trace categories and screenshots
The default start-and-stop flow is the simplest place to begin. Optional categories lets you control which tracing categories are included; a category prefixed with - is excluded. The screenshots option controls screenshot capture within the trace.
await page.tracing.start({
path: 'trace.json',
categories: ['devtools.timeline', '-disabled-by-default-v8.cpu_profiler'],
screenshots: true,
});
await page.goto('https://example.com');
await page.tracing.stop();
Category availability and useful combinations depend on the Chromium tracing configuration. Add options only when you need the events or visual context they provide, and consult the live Puppeteer options reference because API details can change over time.
Rank #4
Observe the one-trace-per-browser limit
Only one trace can be active at a time in a browser. If you need separate captures, stop the current trace before starting the next one. This is particularly important in loops or test suites: ensure every successful start is paired with a stop, including when the measured operation throws.
Recommended Free Tools
await page.tracing.start({ path: 'first.json' });
try {
await page.goto('https://example.com/first');
} finally {
await page.tracing.stop();
}
await page.tracing.start({ path: 'second.json' });
try {
await page.goto('https://example.com/second');
} finally {
await page.tracing.stop();
}
Inspect or troubleshoot the trace
Open the trace
Load the saved trace file in Chrome DevTools or the timeline viewer to inspect recorded activity. Puppeteer documents these as trace viewers; the exact analysis workflow depends on what you are investigating.
Best Value
Common problems and fixes
- No trace file appears: confirm that
start()received apath. Without one, retrieve theUint8Arrayreturned bystop()and save or process it yourself. - The capture is empty or misses the event: start tracing before the navigation or interaction, and stop only after the work you want included has run.
- Starting another trace fails or conflicts with the current capture: only one trace may be active per browser. Stop the existing trace before beginning another.
- The trace is unexpectedly large: narrow the capture window or review the selected categories and whether screenshots are needed. The options reference notes Chromium’s default trace buffer size is 200 MB when
bufferSizeis omitted or zero; avoid treating that configuration default as a guarantee that every capture will fit.
Or skip the browser setup
ScreenshotNeo is a website screenshot API, not a performance-tracing replacement: it returns a page screenshot or PDF rather than Puppeteer’s trace data. If you need a clean visual capture without managing browser setup, one GET request is enough. See the ScreenshotNeo documentation for request options.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
ScreenshotNeo accepts cookie/consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and response headers identify the page verdict and billing status. Its MCP server lets AI agents use screenshot and PDF tools. The free plan includes 1,000 screenshots a month without a card; paid plans start at $5 for 3,000 screenshots.
Sign up for ScreenshotNeo’s free plan to try it without a card.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Frequently Asked Questions
Can Puppeteer trace a single page interaction?
Yes. Start tracing immediately before the interaction and stop after the relevant work completes; the capture applies to the current page.
Does a Puppeteer trace replace a screenshot?
No. A trace records performance activity for inspection, while a screenshot captures the page’s visual appearance. ScreenshotNeo produces screenshots or PDFs, not Puppeteer trace data.
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.




