Closed Zikoat closed 2 years ago
Ah, found it now, from here: https://jakeginnivan.medium.com/vscode-jest-setup-d50dc0062ab9 Add to settings.json:
{
"jestrunner.debugOptions": {
"skipFiles": ["${workspaceFolder}/node_modules/**/*.js","<node_internals>/**"],
"smartStep": true
},
}
Instead of debug.javascript.terminalOptions
.
Hi, i guess this is a feature request. Is it possible to skip node_modules when debugging tests using jest? There are a lot of stack frames, and most of the time we are investigating issues in our own code, and not in other people's libraries.
Reproduction steps:
git clone https://github.com/Zikoat/vscode-jest-skipfiles-repro.git
cd .\vscode-jest-skipfiles-repro\
npm install
code .
sum.js
and add a breakpoint on line 2Debugger stops on that line and shows the stack frames as skipped. This is because of the "skipFiles" setting in
launch.json
.sum.unit.js
and press "debug"The debugger now stops on the specified line, but there are a lot of stack frames that are shown.
Expected behavior: Stack frames are not shown when a test is being debugged. We can also set this for js debug sessions that vscode auto-attaches by setting this setting, but that is not used in this project. Maybe this setting should be taken into account, or there could be some command line options we could set to add to
skipFiles
?