puppeteer/website/versioned_docs/version-19.8.2/api/puppeteer.tracing.md
release-please[bot] 8d026042db
chore: release main (#9939)
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
2023-03-29 11:22:11 +00:00

1.1 KiB

sidebar_label
Tracing

Tracing class

The Tracing class exposes the tracing audit interface.

Signature:

export declare class Tracing

Remarks

You can use tracing.start and tracing.stop to create a trace file which can be opened in Chrome DevTools or timeline viewer.

The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the Tracing class.

Example

await page.tracing.start({path: 'trace.json'});
await page.goto('https://www.google.com');
await page.tracing.stop();

Methods

Method Modifiers Description
start(options) Starts a trace for the current page.
stop() Stops a trace started with the start method.