Skip to content

feat(dev): Add VSCode playwright debug profile #5262

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,34 @@
"internalConsoleOptions": "neverOpen"
},

// Run a specific test file in watch mode (must have file in currently active tab when hitting the play button).
// NOTE: If you try to run this and VSCode complains that the command `shellCommand.execute` can't be found, go
// install the recommended extension Tasks Shell Input.
{
"name": "Debug playwright tests (just open file)",
"type": "pwa-node",
"cwd": "${workspaceFolder}/packages/${input:getPackageName}",
"request": "launch",
"runtimeExecutable": "yarn",
"runtimeArgs": [
// `nodemon` is basically `node --watch`
"nodemon",
// be default it only watches JS files, so have it watch TS files instead
"--ext",
"ts",
"${workspaceFolder}/node_modules/playwright/node_modules/.bin/playwright",
"test",
"${file}"
],
"skipFiles": ["<node_internals>/**"],
"outFiles": ["${workspaceFolder}/**/*.js", "!**/node_modules/**"],
"sourceMaps": true,
"smartStep": true,
"internalConsoleOptions": "openOnSessionStart",
// show stdout and stderr output in the debug console
"outputCapture": "std"
},

// @sentry/nextjs - Run a specific integration test file
// Must have test file in currently active tab when hitting the play button, and must already have run `yarn` in test app directory
{
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
"lerna": "3.13.4",
"madge": "4.0.2",
"mocha": "^6.1.4",
"nodemon": "^2.0.16",
"npm-run-all": "^4.1.5",
"prettier": "2.5.1",
"recast": "^0.20.5",
Expand Down
Loading