Skip to content

Commit 2de6948

Browse files
authored
feat(dev): Add profile for debugging tests in @sentry/core in VSCode (#3063)
1 parent 0c4e7e1 commit 2de6948

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.vscode/launch.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// Hover to view descriptions of existing attributes.
44
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
55
"version": "0.2.0",
6+
// TODO: these are all alike save the package, so figure out how to make that variable
67
"configurations": [
78
// @sentry/tracing - run a specific test file in watch mode
89
// must have file in currently active tab when hitting the play button
@@ -51,5 +52,29 @@
5152
"console": "integratedTerminal", // otherwise it goes to the VSCode debug terminal, which can't read from stdin
5253
"internalConsoleOptions": "neverOpen", // since we're not using it, don't automatically switch to it
5354
},
55+
56+
// @sentry/core - run a specific test file in watch mode
57+
// must have file in currently active tab when hitting the play button
58+
{
59+
"type": "node",
60+
"request": "launch",
61+
"cwd": "${workspaceFolder}/packages/core",
62+
"name": "Debug @sentry/core tests - just open file",
63+
"program": "${workspaceFolder}/node_modules/.bin/jest",
64+
"args": [
65+
"--watch",
66+
"--runInBand",
67+
"--config",
68+
"${workspaceFolder}/packages/core/package.json",
69+
"--coverage",
70+
"false", // coverage messes up the source maps
71+
"${relativeFile}" // remove this to run all package tests
72+
],
73+
"disableOptimisticBPs": true,
74+
"sourceMaps": true,
75+
"smartStep": true,
76+
"console": "integratedTerminal", // otherwise it goes to the VSCode debug terminal, which can't read from stdin
77+
"internalConsoleOptions": "neverOpen", // since we're not using it, don't automatically switch to it
78+
},
5479
]
5580
}

0 commit comments

Comments
 (0)