Skip to content

Commit 3a1c853

Browse files
committed
VS Code: add a debug configuration to debug the tests
This is _very_ convenient: just select the "Debug" panel on the left side of the VS Code window, select the `Debug Tests` in the drop-down box at the top of said panel, set breakpoints at your heart's extent and start debugging interactively, with the ability to inspect local variables and single-stepping. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 4c2df3c commit 3a1c853

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

.vscode/launch.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
{
22
"version": "0.2.0",
33
"configurations": [
4+
{
5+
"type": "node",
6+
"request": "launch",
7+
"name": "Debug Tests",
8+
"program": "${workspaceRoot}/node_modules/.bin/jest",
9+
"cwd": "${workspaceRoot}",
10+
"args": ["--runInBand", "--config", "jest.config.js"],
11+
"windows": {
12+
"program": "${workspaceFolder}/node_modules/jest/bin/jest"
13+
}
14+
},
415
{
516
"name": "Attach to Node Functions",
617
"type": "node",
@@ -9,4 +20,4 @@
920
"preLaunchTask": "func: host start"
1021
}
1122
]
12-
}
23+
}

0 commit comments

Comments
 (0)