The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Stop an active Puppeteer performance trace with await page.tracing.stop(). If you need a trace file, pass a path when starting the trace; otherwise, use the data returned by stop().
Stop the trace and collect its data
The tracing API is exposed on a Puppeteer page as page.tracing. Start tracing, perform the page action you want to measure, then await stop():
As an Amazon Associate I earn from qualifying purchases.
const page = await browser.newPage();
await page.tracing.start({path: 'trace.json'});
await page.goto('https://example.com');
const trace = await page.tracing.stop();
stop() is asynchronous. Await it so tracing has stopped and its result has settled before you use the output. The documented return type is Uint8Array | undefined; when present, the buffer contains trace data. See Puppeteer’s Tracing.stop() API reference.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Choose where the trace output goes
| How you start tracing | Where to get the output | Best fit |
|---|---|---|
Pass path to page.tracing.start() |
Puppeteer writes the trace to that path. You can also inspect the value returned by stop() when present. |
A persistent file you can open later. |
Omit path |
Use the buffer returned by the awaited page.tracing.stop(), when present. |
Keeping trace data in memory for your workflow. |
The API does not document output options on stop(); configure capture options when calling start(). Puppeteer describes trace files as viewable in Chrome DevTools or a timeline viewer. See the Tracing class reference and TracingOptions reference.
#1 Best Overall
Configure capture before starting
The TracingOptions reference documents these options:
path: the output file path.categories: trace categories to include or exclude; prefix a category with-to exclude it.screenshots: whether to capture screenshots; defaults tofalse.bufferSize: buffer size in kilobytes. If omitted or set to zero, the documented Chromium default is 200 MB (200,000 KB); the documentation does not state a year for this value.
Check the API documentation corresponding to your installed Puppeteer version. The official reference pages have shown version labels ranging from 25.3.0 to 25.12.0, so options and details should be verified against the version your project uses.
Rank #2
Capture multiple runs safely
Only one trace can be active at a time per browser. For repeated captures, stop the current trace before starting another. A simple sequential pattern is:
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →for (const [index, url] of urls.entries()) {
await page.tracing.start({path: `trace-${index}.json`});
await page.goto(url);
await page.tracing.stop();
}
Awaiting each stop ensures the preceding capture has ended before the next one starts.
Rank #3
Troubleshoot missing or unusable output
- No trace file appears: confirm that
pathwas provided topage.tracing.start(). Without it, retrieve the trace from the result ofstop(). - The in-memory result is missing: await
page.tracing.stop()and check whether it returned a buffer; the declared return type also permitsundefined. - You cannot start another capture: stop the active trace first. Puppeteer documents one active trace per browser.
- The trace does not contain the expected capture settings: set categories, screenshots, buffer size, and output path at start time;
stop()is not documented as accepting these options. - You are unsure how to inspect the saved file: Puppeteer identifies Chrome DevTools and timeline viewers as options for opening a trace file.
Or skip the browser setup
If you need a website screenshot rather than a Puppeteer performance trace, ScreenshotNeo provides a screenshot API and MCP server. A single GET request can return an image or PDF. This does not create a Puppeteer performance trace.
Quick Recap
Rank #4
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
See the ScreenshotNeo documentation for request options. Cookie banners are accepted and removed along with supported newsletter popups and chat widgets before capture. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed. An MCP server lets AI agents use screenshot tools, and the free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000.
Sign up for ScreenshotNeo’s free plan.
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.




