sincecutoff.com
← all changes

playwright test --debug=cli attaches coding agents to paused tests

Introduced 2026-04-01 · score 0.98

HOW TO USE IT

When debugging a failing repository test, start it with `--debug=cli`, attach to the emitted session, then step through the paused test with `playwright-cli`.

npx playwright test --debug=cli
playwright-cli attach <session>
playwright-cli --session=<session> step-over

WHY THIS HELPS

When debugging a failing repository test, start it in CLI debug mode and attach to inspect and step through the paused test.

REQUIREMENTS AND LIMITATIONS

  • Version: v1.59.0
  • --debug=cli: Runs the test paused at the start and prints debugging instructions.
  • <session> (required): The session name emitted by the test runner; pass it to `attach`.
  • --session=<session>: Selects the named browser session for a CLI command.
  • Prerequisite: Playwright 1.59.0 or newer is needed for `--debug=cli`.
  • Prerequisite: If Playwright is already a project dependency, the docs say `playwright-cli` commands can also be run as `npx playwright cli <command>`.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card