ts-jest-sample
ts-jest-sample copied to clipboard
Launch setting not working
Thanks for pulling this together. It helped me set this up to work. The only thing that I couldn't get to work was the launch setting, but I found an official snippet instead that DID work: https://github.com/Microsoft/vscode-recipes/tree/master/debugging-jest-tests
I don't really see a difference. What was the error you rant into? The only difference I see is that --inspect-brk
. I'm currently using that with my current project without issue. I wonder if it is sensitive to which version of Node you are running? I'm running v8.9.4
, for reference.
Yeah well I don’t know really. All I know is that with the settings in this project I got a connection error that didn’t happen with the ms snippet. Go figure maybe?
Well what version of Node are you running? IIRC, there were changes to how the debugger functioned between 8 and 6. So if you are using 6, that could explain it.
I had the same issue. I had to copy that configuration to make it work:
{
"type": "node",
"request": "launch",
"name": "Jest All",
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
"args": ["--runInBand"],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
},
{
"type": "node",
"request": "launch",
"name": "Jest Current File",
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
"args": ["${relativeFile}"],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
}
I'm using npm 6.1.0 and node 8.11.2