The Playwright Trace Viewer is a GUI tool for exploring recorded traces after the script has run, and traces are a great way of debugging tests that fail on CI. Open a saved trace locally with npx playwright show-trace path/to/trace.zip, or in the browser at trace.playwright.dev, a statically hosted variant that loads the trace entirely in your browser and transmits no data externally; remote traces open directly from a URL, with CORS rules applying. Record a trace during development with --trace on — UI Mode traces each test automatically — and on CI set trace: 'on-first-retry' in playwright.config so a trace.zip is produced only for the first retry of a failed test; other options are 'on-all-retries', 'off', 'on' (not recommended, as it is performance heavy), and 'retain-on-failure'. The library API records manually via context.tracing.start({ screenshots: true, snapshots: true }) and context.tracing.stop({ path: 'trace.zip' }). Scope: Playwright. Reviewed October 4, 2026.
Tracing and debugging with the Trace Viewer
Document v1 · published by Koskamo editorial · updated 2026-10-04
Source and provenance
- Original source
- playwright.dev
- Published on Koskamo by
- Koskamo editorial
- Citation version
- Document v1
- Reuse
- Original summaries; linked sources retain their own terms.