mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
chore: Add launch.template.json for debugging tests (#9599)
This commit is contained in:
parent
f12f27e1eb
commit
25154c14d7
@ -22,6 +22,8 @@ generated/
|
||||
|
||||
# IDE Artifacts
|
||||
.vscode
|
||||
!.vscode/extensions.json
|
||||
!.vscode/*.template.json
|
||||
.devcontainer
|
||||
|
||||
# Misc
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -22,6 +22,7 @@ generated/
|
||||
# IDE Artifacts
|
||||
.vscode/*
|
||||
!.vscode/extensions.json
|
||||
!.vscode/*.template.json
|
||||
.devcontainer
|
||||
|
||||
# Misc
|
||||
|
@ -23,6 +23,7 @@ generated/
|
||||
# IDE Artifacts
|
||||
.vscode/*
|
||||
!.vscode/extensions.json
|
||||
!.vscode/*.template.json
|
||||
.devcontainer
|
||||
|
||||
# Misc
|
||||
|
43
.vscode/launch.template.json
vendored
Normal file
43
.vscode/launch.template.json
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"inputs": [
|
||||
{
|
||||
"type": "pickString",
|
||||
"id": "suit",
|
||||
"description": "Which test suit to run?",
|
||||
"options": [
|
||||
"chrome-headless",
|
||||
"chrome-headful",
|
||||
"chrome-new-headless",
|
||||
"firefox-headless",
|
||||
"firefox-headful",
|
||||
"firefox-bidi",
|
||||
"chrome-bidi"
|
||||
],
|
||||
"default": "chrome-headless"
|
||||
}
|
||||
],
|
||||
"configurations": [
|
||||
{
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"name": "Launch Tests",
|
||||
"skipFiles": ["<node_internals>/**"],
|
||||
"runtimeExecutable": "npm",
|
||||
"cwd": "${workspaceFolder}",
|
||||
"runtimeArgs": [
|
||||
"run-script",
|
||||
"test",
|
||||
"--",
|
||||
"--test-suite",
|
||||
"${input:suit}",
|
||||
"--no-coverage",
|
||||
"--no-suggestions"
|
||||
],
|
||||
"outFiles": ["${workspaceFolder}/**/*.js"]
|
||||
}
|
||||
]
|
||||
}
|
@ -264,6 +264,16 @@ ensure this, the main `test` command runs coverage during testing.
|
||||
|
||||
See [Debugging Tips](https://pptr.dev/guides/debugging).
|
||||
|
||||
### Debugging Puppeteer tests via VSCode
|
||||
|
||||
Copy the provided default `.vscode/launch.template.json` to `.vscode/launch.json` and then use the integrated VSCode debugger to debug test.
|
||||
|
||||
Remember to build test before launching via:
|
||||
|
||||
```sh
|
||||
npm run build --workspace @puppeteer-test/test
|
||||
```
|
||||
|
||||
# For Project Maintainers
|
||||
|
||||
## Rolling new Chromium version
|
||||
|
Loading…
Reference in New Issue
Block a user