1
0
mirror of https://github.com/microsoft/TypeScript-Node-Starter.git synced 2025-11-08 14:47:28 +00:00

Add ability to debug Jest test from VSCode (#291)

thx to @diberry!
This commit is contained in:
Dina Berry
2020-06-14 12:46:51 -07:00
committed by GitHub
parent 78c05d5156
commit fedb0a2fe7

34
.vscode/launch.json vendored
View File

@@ -3,13 +3,43 @@
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
"configurations": [
{
"type": "node",
"request": "attach",
"name": "Attach by Process ID",
"processId": "${command:PickProcess}",
"protocol": "inspector"
}
},
{
"type": "node",
"request": "launch",
"name": "Jest Current File",
"program": "${workspaceFolder}/node_modules/.bin/jest",
"args": [
"${fileBasenameNoExtension}",
"--detectOpenHandles"
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"disableOptimisticBPs": true,
"windows": {
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
}
},
{
"type": "node",
"request": "launch",
"name": "Jest all",
"runtimeExecutable": "npm",
"runtimeArgs": [
"run-script",
"test"
],
"port": 9229,
"skipFiles": [
"<node_internals>/**"
]
},
]
}