Skip to main content
guidesSource-backed

Playwright Trace Viewer AI Debugging Guide

Source-backed guide for using Playwright traces, screenshots, snapshots, network events, console logs, and action timelines as evidence for AI-assisted frontend debugging.

by JSONbored·added 2026-06-05·
Review first review before installing

Open the source and read safety notes before installing.

Citation facts

Source-backed facts for citing this resource, derived directly from the registry — also available as plain text for AI assistants.

Source URLs
https://playwright.dev/docs/trace-viewer, https://github.com/JSONbored/awesome-claude/blob/main/content/guides/playwright-trace-viewer-ai-debugging-guide.mdx
Safety notes
Browser traces can contain form inputs, cookies, URLs, screenshots, DOM text, and request metadata., Do not collect traces from production accounts unless test data and retention are approved.
Privacy notes
Redact screenshots, network payloads, auth tokens, private URLs, and user content before sharing traces externally.
Author
JSONbored
Submitted by
JSONbored
Claim status
unclaimed
Last verified
2026-06-05

Decision playbook

Review trust signals before you adopt

Signals are present but mixed. Use the checklist below to confirm the source and operational safety for your environment.

Compare context
Selected

0

Current score

63

Baseline

Delta

No baseline selected

No major trust-signal divergence detected in the current selection.

Source and provenance checks

Needs review

Confirm ownership and provenance before trusting install instructions.

  • Source link availableRequired

    Open the canonical repository and verify ownership.

    Done
  • Source provenance statusRequired

    Marked as source-backed.

    Done
  • Metadata reviewed

    No reviewed flag detected in metadata.

    Pending

Safety and privacy checks

Complete

Validate risk disclosures before installation or API wiring.

  • Safety notes presentRequired

    Review the listed safety guidance before running commands.

    Done
  • Privacy notes presentRequired

    Review data handling notes before connecting accounts or secrets.

    Done
  • Trust level risk gateRequired

    Trust level does not block evaluation.

    Done

Package and install checks

Needs review

Check package metadata and artifact integrity signals.

  • Install payload available

    Install or copy payload is available for review.

    Done
  • Package verification flag

    No package verification flag provided.

    Pending
  • Checksum metadata

    No checksum provided for downloaded artifact.

    Pending

Compare-driven decision checks

Needs review

Use compare context to validate trade-offs before adoption.

  • Compare tray has multiple entries

    Add at least one more entry to compare trust differences.

    Pending
  • Baseline comparison available

    No baseline peer selected yet.

    Pending
  • Diverging trust signals identified

    No major trust-signal divergence found.

    Pending

Setup at a glance

Copy & paste

Copy-ready — paste the snippet to get started.

Adoption plan

Balanced adoption plan

Current risk score 24/100. Use staged verification before broader rollout.

Risk 24

Pre-adoption checks

Validate source and review signals before any execution.

  • Confirm source provenanceRequired

    Source URL/provenance metadata is present.

    Done
  • Confirm metadata review state

    No review metadata found; increase manual validation.

    Pending
  • Verify install payload

    Install/config payload exists and can be inspected.

    Done

Security checks

Confirm safety, privacy, and package integrity signals.

  • Review safety notesRequired

    Safety notes are present.

    Done
  • Review privacy notesRequired

    Privacy notes are present.

    Done
  • Verify package integrity metadata

    No package verification/checksum metadata.

    Pending

Rollout

Adopt in controlled steps based on the selected plan.

  • Run in isolated sandbox firstRequired

    Use a constrained sandbox and observe behavior across multiple tasks.

    Pending
  • Roll out graduallyRequired

    Roll out to a small cohort before wider usage.

    Pending
  • Set monitoring and fallback

    Define rollback path and monitor errors after adoption.

    Pending

Evidence readiness

Evidence readiness matrix · balanced

Missing required evidence: Metadata review. Risk score 31.

Risk 31

Source provenance

Present

Source repository/provenance is listed.

Required in this preset

Metadata review

Missing

Review metadata is missing.

Required in this preset

Safety notes

Present

Safety notes are present.

Required in this preset

Privacy notes

Present

Privacy notes are present.

Optional in this preset

Package integrity

Missing

Package integrity metadata is missing.

Optional in this preset

Install payload

Present

Install payload is available.

Required in this preset

Required gaps: Metadata review

Decision timeline

Decision timeline · balanced

Blocking gaps: Check metadata review status. Risk 28.

Risk 28

triage

Confirm source provenanceRequired

Source/provenance metadata is available.

Done

triage

Check metadata review statusRequired

Review metadata is missing.

Pending

verify

Review safety notesRequired

Safety notes are available.

Done

verify

Review privacy notes

Privacy notes are available.

Done

verify

Validate package integrity metadata

Package integrity metadata is missing.

Pending

rollout

Verify install payload and commandsRequired

Install payload is available.

Done

Blockers: Check metadata review status

Prerequisite readiness

Prerequisite readiness

3 prerequisites to line up before setup.

0/3 ready
General3

Safety & privacy surface

Safety & privacy surface

2 safety and 1 privacy notes across 3 risk areas. Review closely: credentials & tokens, network access.

3 areas
  • SafetyNetwork accessBrowser traces can contain form inputs, cookies, URLs, screenshots, DOM text, and request metadata.
  • SafetyData retentionDo not collect traces from production accounts unless test data and retention are approved.
  • PrivacyCredentials & tokensRedact screenshots, network payloads, auth tokens, private URLs, and user content before sharing traces externally.

Safety notes

  • Browser traces can contain form inputs, cookies, URLs, screenshots, DOM text, and request metadata.
  • Do not collect traces from production accounts unless test data and retention are approved.

Privacy notes

  • Redact screenshots, network payloads, auth tokens, private URLs, and user content before sharing traces externally.

Prerequisites

  • Playwright test suite or reproducible browser script.
  • Ability to capture traces for failing UI flows.
  • Local or CI access to trace archives.

Schema details

Install type
copy
Reading time
6 min
Difficulty score
49
Troubleshooting
Yes
Breaking changes
No
Skill and platform metadata
Retrieval sources
https://playwright.dev/docs/trace-viewerhttps://playwright.dev/docs/trace-viewer-intro
Full copyable content
## Why Traces Beat Guesses

When an AI assistant sees only source code, it has to infer browser state. A
Playwright trace records the actual run: actions, snapshots, screenshots, console
messages, network events, and timing. That makes the debugging question much
smaller and more factual.

## Capture Pattern

1. Enable tracing on retry or for the failing project.
2. Reproduce the failure in CI or locally.
3. Open Trace Viewer and identify the first unexpected state.
4. Extract only the relevant step, screenshot, console entry, network event, and
   assertion failure.
5. Ask the AI to propose a patch and a verification command.
6. Re-run the failing test before trusting the explanation.

## Enable Tracing And Open The Trace

Configure tracing in `playwright.config.ts`. The `on-first-retry` value records
a trace only when a failed test is retried, which keeps successful runs cheap
while still capturing evidence for flaky failures:

```ts
// playwright.config.ts
import { defineConfig } from "@playwright/test";

export default defineConfig({
  retries: 1,
  use: {
    trace: "on-first-retry",
  },
});
```

Other supported values are `off`, `on` (record for every test),
`on-all-retries`, and `retain-on-failure` (record every test but discard traces
from runs that pass).

During local development you can force tracing for a run without relying on
retry logic, then open the resulting archive in Trace Viewer:

```sh
# Record a trace for the run
npx playwright test --trace on

# Open a local trace archive
npx playwright show-trace path/to/trace.zip

# Open a remote trace archive
npx playwright show-trace https://example.com/trace.zip
```

You can also drag and drop a `trace.zip` onto the hosted viewer at
`https://trace.playwright.dev`, or open it from the HTML report by clicking the
trace icon next to a test.

## What The Trace Viewer Shows

Use this map to decide which panel holds the evidence you need before building an
AI evidence packet:

| Panel | What it contains | Use it to |
| --- | --- | --- |
| Actions | Timeline of every test action | Find the first unexpected step |
| Snapshots | DOM state before, during, and after each action | See what the page actually looked like |
| Screenshots | Filmstrip of frames across the run | Spot the moment the UI diverged |
| Source | The test source line for the selected action | Tie a failure back to code |
| Call | Timing, locator, and parameters for an action | Confirm the right element was targeted |
| Log | Step-by-step execution log | Trace actionability and waits |
| Errors | Assertion and runtime errors | Read the exact failure message |
| Console | Browser console logs and warnings | Catch client-side errors |
| Network | Requests, status codes, and payloads | Find failed or missing requests |
| Metadata | Run details (browser, viewport, retries) | Explain CI-only differences |
| Attachments | Visual regression comparisons | Diff expected vs actual images |

## What To Hand The AI

- Test name and expected user behavior.
- Failing assertion and step number.
- Screenshot or DOM snapshot description.
- Console errors and relevant warnings.
- Network failures, status codes, or missing requests.
- Any timing or actionability signal from the trace.

## Troubleshooting

### The trace is too large

Do not paste everything. Use the trace to select the earliest incorrect state,
then provide a small evidence packet.

### The failure only happens in CI

Compare CI trace video/screenshots with local traces. Device scale factor,
viewport, locale, timezone, and missing seed data are common differences.

## References

- Trace Viewer - https://playwright.dev/docs/trace-viewer
- Trace Viewer intro - https://playwright.dev/docs/trace-viewer-intro
- Debugging tests - https://playwright.dev/docs/debug
- Test configuration - https://playwright.dev/docs/test-configuration

About this resource

Why Traces Beat Guesses

When an AI assistant sees only source code, it has to infer browser state. A Playwright trace records the actual run: actions, snapshots, screenshots, console messages, network events, and timing. That makes the debugging question much smaller and more factual.

Capture Pattern

  1. Enable tracing on retry or for the failing project.
  2. Reproduce the failure in CI or locally.
  3. Open Trace Viewer and identify the first unexpected state.
  4. Extract only the relevant step, screenshot, console entry, network event, and assertion failure.
  5. Ask the AI to propose a patch and a verification command.
  6. Re-run the failing test before trusting the explanation.

Enable Tracing And Open The Trace

Configure tracing in playwright.config.ts. The on-first-retry value records a trace only when a failed test is retried, which keeps successful runs cheap while still capturing evidence for flaky failures:

// playwright.config.ts
import { defineConfig } from "@playwright/test";

export default defineConfig({
  retries: 1,
  use: {
    trace: "on-first-retry",
  },
});

Other supported values are off, on (record for every test), on-all-retries, and retain-on-failure (record every test but discard traces from runs that pass).

During local development you can force tracing for a run without relying on retry logic, then open the resulting archive in Trace Viewer:

# Record a trace for the run
npx playwright test --trace on

# Open a local trace archive
npx playwright show-trace path/to/trace.zip

# Open a remote trace archive
npx playwright show-trace https://example.com/trace.zip

You can also drag and drop a trace.zip onto the hosted viewer at https://trace.playwright.dev, or open it from the HTML report by clicking the trace icon next to a test.

What The Trace Viewer Shows

Use this map to decide which panel holds the evidence you need before building an AI evidence packet:

Panel What it contains Use it to
Actions Timeline of every test action Find the first unexpected step
Snapshots DOM state before, during, and after each action See what the page actually looked like
Screenshots Filmstrip of frames across the run Spot the moment the UI diverged
Source The test source line for the selected action Tie a failure back to code
Call Timing, locator, and parameters for an action Confirm the right element was targeted
Log Step-by-step execution log Trace actionability and waits
Errors Assertion and runtime errors Read the exact failure message
Console Browser console logs and warnings Catch client-side errors
Network Requests, status codes, and payloads Find failed or missing requests
Metadata Run details (browser, viewport, retries) Explain CI-only differences
Attachments Visual regression comparisons Diff expected vs actual images

What To Hand The AI

  • Test name and expected user behavior.
  • Failing assertion and step number.
  • Screenshot or DOM snapshot description.
  • Console errors and relevant warnings.
  • Network failures, status codes, or missing requests.
  • Any timing or actionability signal from the trace.

Troubleshooting

The trace is too large

Do not paste everything. Use the trace to select the earliest incorrect state, then provide a small evidence packet.

The failure only happens in CI

Compare CI trace video/screenshots with local traces. Device scale factor, viewport, locale, timezone, and missing seed data are common differences.

References

Source citations

Add this badge to your README

Show that Playwright Trace Viewer AI Debugging Guide is listed on HeyClaude. Paste this Markdown into your README — it renders the badge and links back to this page.

Listed on HeyClaude
[![Listed on HeyClaude](https://heyclau.de/badge/guides/playwright-trace-viewer-ai-debugging-guide.svg)](https://heyclau.de/entry/guides/playwright-trace-viewer-ai-debugging-guide)

How it compares

Playwright Trace Viewer AI Debugging Guide side by side with 3 alternatives on trust, install, platform support, and disclosed safety notes — all from reviewed registry metadata.

1 trust signal differ across this comparison (Submitter).

Next steps differ across entries — use the actions in the table below to copy install commands and source links per resource.

Field

Source-backed guide for using Playwright traces, screenshots, snapshots, network events, console logs, and action timelines as evidence for AI-assisted frontend debugging.

Open dossier

Expert skill for reviewing Playwright trace artifacts, screenshots, action timelines, network events, retries, and CI evidence to classify flaky browser test failures without guessing from logs alone.

Open dossier

Transform Claude into a Playwright specialist with deep knowledge of browser automation, resilient locators, fixtures, tracing, and CI-friendly end-to-end testing.

Open dossier

A source-backed frontend QA collection for AI-assisted UI work: combine WCAG accessibility checks, Playwright browser automation, Storybook component context, Chrome DevTools inspection, BrowserStack coverage, and test hooks before shipping user interfaces.

Open dossier
Next stepsDiffers
Trust
Review statusNot reviewedNot reviewedNot reviewedNot reviewed
Package trustPackage not verifiedPackage not verifiedPackage not verifiedPackage not verified
Source provenanceSource-backedSource-backedSource-backedSource-backed
SubmitterDiffersJSONboredJSONboredjaso0n0818MkDev11
Install riskReview firstReview firstReview firstReview first
Notes Safety ✓ Privacy ✓ Safety ✓ Privacy ✓ Safety · Privacy ✓ Safety ✓ Privacy ✓
Brand
Categoryguidesskillsrulescollections
SourceSource-backedSource-backedSource-backedSource-backed
AuthorJSONboredJSONboredjaso0n0818MkDev11
Added2026-06-052026-06-052026-06-172026-06-04
Platforms
Harness
Source repo
Safety notesBrowser traces can contain form inputs, cookies, URLs, screenshots, DOM text, and request metadata. Do not collect traces from production accounts unless test data and retention are approved.Trace artifacts can include screenshots, DOM text, URLs, request metadata, console output, and application state; review them before sharing publicly. Do not fix a trace-only symptom by adding broad waits, retries, or timeouts unless the trace evidence supports that change. Keep destructive browser actions and production-like credentials out of replayed failure reproduction.— missingThis collection is read/validation oriented, but browser automation can still submit forms or trigger side effects if pointed at production. Run Playwright, BrowserStack, and DevTools workflows against local, preview, or staging environments first. Treat accessibility findings as review inputs; manual keyboard, screen-reader, and content checks are still needed before release.
Privacy notesRedact screenshots, network payloads, auth tokens, private URLs, and user content before sharing traces externally.Playwright traces can expose user names, emails, tokens in URLs, internal hostnames, test data, screenshots, and API payload fragments. Public PR comments should summarize trace evidence without uploading private trace files or pasting sensitive network details.Rules reference test credentials and environment URLs; store them in CI secrets or local env files, never in committed test sources.The collection itself stores no data; linked browser tools may capture screenshots, DOM text, network requests, console logs, or session cookies. Use test accounts and scrub screenshots or traces before sharing them outside the team. Cross-browser cloud testing can send page content and assets to a third-party provider.
Prerequisites
  • Playwright test suite or reproducible browser script.
  • Ability to capture traces for failing UI flows.
  • Local or CI access to trace archives.
  • Playwright test failure, trace artifact, test report, or CI run under review.
  • Access to test source, Playwright config, browser/project name, retry settings, and relevant artifacts.
  • Permission to inspect screenshots, DOM snapshots, console logs, network events, and request/response metadata.
— none listed
  • A frontend project with a repeatable local dev server and test command.
  • Agreement on the browser/device matrix and WCAG conformance target before enabling blocking checks.
  • Test credentials or seeded demo data for flows that require login, checkout, dashboards, or user-specific state.
Install
npm init playwright@latest
Config
Citations
ClaimUnclaimedUnclaimedUnclaimedUnclaimed
Open 4 picks in the interactive comparison tool

Related guides

Signals

Loading live community signals…

More like this, weekly

A short, calm digest of reviewed Claude resources. Unsubscribe any time.