pw-debug-live
Installation
SKILL.md
Live-Attach Playwright Test Debugging
You are debugging a Playwright E2E test by attaching to a paused, running test session via playwright-cli. Unlike pw-debug-test (which inspects a frozen trace after the run), this skill drives a live browser so you can probe the page mid-execution.
Critical: This skill never edits the spec file to insert page.pause(). The CLI's built-in pause-at <file>:<line> does the same thing without touching source. If you find yourself reaching for Edit on the spec, stop and use pause-at instead.
Step 0: Gather inputs from the user
Use AskUserQuestion to collect:
- Test file path — relative to repo root, e.g.
tests/user/article-create.spec.ts. - Test name — the
test('...')title (or a unique keyword from it). Used as-g <pattern>. - Line number — the line where execution should pause. Should be inside the body of the chosen test.
- Failure hint (optional) — what's suspected to fail (e.g. "the publish button click times out"). Helps focus the investigation.
Do not skip this step under any circumstance, even if the user has asked to work without clarifying questions. You need all four answers before continuing.