Use Puppeteer’s page.tracing.start() and page.tracing.stop() around the page activity you want to investigate. Set a path to save the trace as a file, then open it in Chrome DevTools or a timeline viewer. A trace captures performance data for diagnosis; it is not a video recording and does not identify or fix a problem automatically.
Record a trace to a file
Install Puppeteer in a Node.js project, then start tracing immediately before the navigation or interaction you want to examine and stop tracing when that activity is complete:
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' });
await page.goto('https://www.example.com');
await page.tracing.stop();
} finally {
await browser.close();
}
})();
Replace the example URL with the page you want to inspect. The trace is written to trace.json. Keep the interval between start() and stop() limited to the navigation or interaction you need: tracing records the activity in that window, and only one trace can be active per browser.
PC 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 & 11Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchCapture a user interaction instead of navigation
Start tracing before performing the relevant interaction, such as clicking a button, and stop after the page has finished the work you want to inspect. For example:
#1 Best Overall
await page.goto('https://www.example.com');
await page.tracing.start({ path: 'interaction-trace.json' });
await page.click('button');
await page.tracing.stop();
Choose the interaction and stop point deliberately. A trace is useful for examining recorded browser activity, but collecting one does not itself explain the cause of a slowdown.
Return trace data without writing a file
If you omit path, Puppeteer does not write the trace to disk. The stop method can return the trace data as a Uint8Array, which your script can handle or save itself:
Rank #2
- HTML CSS Design and Build Web Sites
- Comes with secure packaging
- It can be a gift option
const trace = await page.tracing.stop();
if (trace) {
require('node:fs').writeFileSync('trace.json', trace);
}
The API type describes stop() as returning Promise<Uint8Array | undefined>. Check that a buffer was returned before using it.
Configure categories, screenshots, and buffer size
page.tracing.start() accepts a tracing options object. The documented options include:
Rank #3
- 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
path: output file path. If omitted, use the buffer returned bystop()if you need to retain the trace.categories: tracing categories to include or exclude. Prefix a category with-to exclude it.screenshots: whether to capture screenshots alongside tracing data. The documented default isfalse.bufferSize: trace buffer size in kilobytes. The reference states that Chromium uses a 200 MB (200,000 KB) default when this option is unspecified or set to zero.
For example, set a path and request screenshot capture with:
await page.tracing.start({
path: 'trace.json',
screenshots: true
});
Use only the categories and options relevant to the question you are investigating. Consult the TracingOptions reference for the installed Puppeteer version before relying on a particular category or default.
Rank #4
Open and interpret the trace
After stopping the trace, open the output in Chrome DevTools or a timeline viewer. Use the timeline to inspect what happened during the bounded period you recorded. The trace is diagnostic evidence: you still need to interpret the recorded activity and investigate the underlying issue.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Performance, reliability, and setup considerations
- Keep trace windows bounded. Start just before the activity of interest and stop when it is done. This avoids collecting unrelated activity and respects the one-active-trace-per-browser limit.
- Choose output handling intentionally. A path writes trace data to disk; without a path, handle the returned buffer if you need to keep or transfer the trace.
- Use the right package for browser setup. Puppeteer’s installation documentation says
npm i puppeteerdownloads a compatible Chrome during installation.npm i puppeteer-coreinstalls the library without downloading Chrome, so use it when you are managing the browser separately. - Check version-specific docs. Puppeteer’s official reference pages surfaced here show versions 25.3.0, 25.9.0, and 25.12.0 on different pages. The API concepts are documented, but verify the reference matching your installed version before depending on a signature or default.
Troubleshooting
No trace file appears
Confirm that path was supplied to page.tracing.start() and that page.tracing.stop() completed. If you omit the path, Puppeteer does not write a file; use the returned buffer instead.
Best Value
The trace contains too much unrelated activity
Move start() closer to the navigation or interaction you want to study and call stop() promptly after it. Trace only one bounded activity at a time.
You expected screenshots in the trace
Set screenshots: true in the tracing options. Screenshot capture is documented as off by default.
You need a video rather than performance data
page.tracing produces trace data for performance inspection. Puppeteer’s separate page.record() API is experimental and uses Chrome’s Page.startScreenRecording API to output an MP4 video stream; it is not a substitute for a performance trace.
Recommended Free Tools
Or skip the browser setup
If you need a clean screenshot rather than a performance trace, ScreenshotNeo returns an image or PDF from one request. It does not replace Puppeteer tracing or produce a performance trace.
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 request options. Before a screenshot, it accepts cookie or consent banners as a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers report the page verdict and billing status. Its MCP server provides screenshot tools for AI agents, including Claude, Cursor, and other 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 1,000 free screenshots a month, with no card.
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.
Free tools Windows power users keep installed
One-click scans. No signup required.




