Are you new to Playwright and not sure how to properly debug tests?
In this video I walk you step-by-step through ALL the essential ways to run and debug Playwright tests — perfect for beginners.
All the infos:
https://playwright.dev/docs/running-t...
✅ You’ll learn:
How to run Playwright tests by default
npx playwright test tests/example.spec.ts
How to run a single file
npx playwright test
How to run a single test by exact line number
npx playwright test tests/example.spec.ts:3
How to use --grep to select tests by name/tag
npx playwright test --grep="title"
How to run tests in headed mode
npx playwright test --headed
How to use --debug mode
npx playwright test --debug
How to use Playwright’s UI mode
npx playwright test --ui
https://playwright.dev/docs/test-ui-mode
How to debug Playwright tests directly in VS Code
VSCode ext: https://marketplace.visualstudio.com/...
How the Playwright VS Code extension makes debugging easier
🧰 Tools used:
Playwright CLI
Headed / UI debug modes
VS Code breakpoints
Playwright VS Code Extension
Whether you're just starting with Playwright or coming from another test framework, this video will make debugging simple and intuitive.
CHAPTERS:
00:00 Intro
00:28 Playwright Install
01:10 Simple run
04:58 Exact file
05:44 Exact line number in the file
06:48 Matches a string
07:48 --DEBUG mode
10:00 --UI mode
13:20 --trace on mode
17:20 VSCode Playwright plugin
21:00 Conclusions