Skip to content

Commit 9ae55d4

Browse files
authored
feat(tooling): Fix VSCode node test debugging, add tracing test debugging (#2918)
1 parent 379ca53 commit 9ae55d4

File tree

1 file changed

+38
-8
lines changed

1 file changed

+38
-8
lines changed

.vscode/launch.json

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,52 @@
44
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
55
"version": "0.2.0",
66
"configurations": [
7+
// @sentry/tracing - run a specific test file in watch mode
8+
// must have file in currently active tab when hitting the play button
79
{
810
"type": "node",
911
"request": "launch",
10-
"cwd": "${workspaceFolder}/packages/node",
11-
"name": "Debug @sentry/node",
12-
"preLaunchTask": "",
13-
"program": "${workspaceRoot}/node_modules/.bin/jest",
12+
"cwd": "${workspaceFolder}/packages/tracing",
13+
"name": "Debug @sentry/tracing tests - just open file",
14+
"program": "${workspaceFolder}/node_modules/.bin/jest",
1415
"args": [
16+
"--watch",
17+
"--runInBand",
1518
"--config",
16-
"${workspaceRoot}/packages/node/package.json",
19+
"${workspaceFolder}/packages/tracing/package.json",
20+
"--coverage",
21+
"false", // coverage messes up the source maps
22+
"${relativeFile}" // remove this to run all package tests
23+
],
24+
"disableOptimisticBPs": true,
25+
"sourceMaps": true,
26+
"smartStep": true,
27+
"console": "integratedTerminal", // otherwise it goes to the VSCode debug terminal, which can't read from stdin
28+
"internalConsoleOptions": "neverOpen", // since we're not using it, don't automatically switch to it
29+
},
30+
31+
// @sentry/node - run a specific test file in watch mode
32+
// must have file in currently active tab when hitting the play button
33+
{
34+
"type": "node",
35+
"request": "launch",
36+
"cwd": "${workspaceFolder}/packages/node",
37+
"name": "Debug @sentry/node tests - just open file",
38+
"program": "${workspaceFolder}/node_modules/.bin/jest",
39+
"args": [
40+
"--watch",
1741
"--runInBand",
18-
"${relativeFile}"
42+
"--config",
43+
"${workspaceFolder}/packages/node/package.json",
44+
"--coverage",
45+
"false", // coverage messes up the source maps
46+
"${relativeFile}" // remove this to run all package tests
1947
],
48+
"disableOptimisticBPs": true,
2049
"sourceMaps": true,
2150
"smartStep": true,
22-
"outFiles": ["${workspaceRoot}/packages/node/dist"]
23-
}
51+
"console": "integratedTerminal", // otherwise it goes to the VSCode debug terminal, which can't read from stdin
52+
"internalConsoleOptions": "neverOpen", // since we're not using it, don't automatically switch to it
53+
},
2454
]
2555
}

0 commit comments

Comments
 (0)