Recommended Free Tools
Start tracing with page.tracing.start({ path: 'trace.json' }), run the browser activity you want to record, then await page.tracing.stop(). The path option tells Puppeteer to write the trace to disk. Without it, Puppeteer does not save a file automatically; your code can instead handle the trace data returned by stop().
Save a trace directly to a file
Tracing covers the browser activity between the awaited start() and stop() calls. Set path when you want Puppeteer to write the output file.
As an Amazon Associate I earn from qualifying purchases.
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch();
try {
const page = await browser.newPage();
await page.tracing.start({ path: 'trace.json' });
try {
await page.goto('https://example.com');
// Run the interactions or page work you want to capture here.
} finally {
await page.tracing.stop();
}
} finally {
await browser.close();
}
})();
The inner finally makes the stop call run even if the navigation or an interaction throws. Keep the browser open until tracing has stopped. The resulting trace can be opened in Chrome DevTools or a timeline viewer.
Choose between a file and trace data
| Method | Who persists the trace? | Use it when |
|---|---|---|
start({ path: 'trace.json' }) |
Puppeteer writes directly to the specified path. | You want a trace file without handling its bytes in application code. |
start() without a path |
Your application. stop() can resolve to a Uint8Array of trace data. |
You need to process or store the bytes yourself, or choose an output path dynamically. |
The documented return type of stop() is Promise<Uint8Array | undefined>. Account for the possibility of undefined; do not assume that calling stop() always creates a file.
#1 Best Overall
const fs = require('node:fs/promises');
await page.tracing.start();
await page.goto('https://example.com');
const traceData = await page.tracing.stop();
if (traceData) {
await fs.writeFile('trace.json', traceData);
}
Configure what the trace captures
Puppeteer’s tracing options include path, categories, screenshots, and bufferSize. Screenshots are off by default. Categories can be included or excluded; prefix a category with a minus sign to exclude it.
await page.tracing.start({
path: 'trace.json',
screenshots: true,
categories: ['devtools.timeline', '-disabled-by-default-devtools.timeline'],
});
Choose categories for the events you need to inspect rather than assuming every trace must use the same set. The documented options also describe bufferSize: when omitted or set to zero, Chromium’s default is 200 MB (200,000 KB). That default is version-sensitive implementation guidance, not a fixed limit guaranteed across all Chromium versions.
Rank #2
Work within the one-trace-per-browser limit
Puppeteer documents that only one trace can be active at a time per browser. Stop the current trace before starting another in that browser. If you need separate captures, run them sequentially rather than overlapping tracing sessions.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Open and inspect the saved trace
After stop() has completed, open the resulting trace file in Chrome DevTools or a compatible timeline viewer. If the file is missing, first confirm that start() received a path and that the application awaited stop() before closing the browser or ending the process.
Rank #3
Troubleshoot common problems
- No file appears: If tracing started without
path, Puppeteer did not write a file; persist the returned bytes yourself. If a path was set, make sure the process reached and awaitedstop(). stop()returns no bytes: The documented return type allowsundefined. Check the result before writing it, and use apathif direct file output is what you need.- A second trace cannot start: Only one trace can be active per browser. Await the first trace’s
stop()before starting the next. - The trace lacks screenshots: Screenshot capture defaults to off. Set
screenshots: truewhen starting the trace. - Trace options behave differently in your installation: Puppeteer documentation pages may refer to different releases. Check the API documentation matching your installed Puppeteer version before relying on version-sensitive behavior.
Or skip the browser setup
A trace records browser timeline activity; a website screenshot is a different output. If you need a clean screenshot rather than trace events, ScreenshotNeo offers a screenshot API and MCP server. Its request format and options are in the ScreenshotNeo documentation.
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 or consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each of those steps can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, with response headers indicating the page verdict and billing status. Its MCP server provides screenshot and page-information tools for AI agents. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots.
Sign up for 1,000 free screenshots a month, with no card required.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Quick Recap
Rank #4
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.




