-
Notifications
You must be signed in to change notification settings - Fork 54
Description
First off - awesome generator, thanks for all of your efforts.
Everything works perfectly, except the ability to debug the test file(s).
Here is what I saw when I launch test 'Debug test' with the greeter-spec.ts file open in the editor:
Cannot launch program 'd:\VSTS-DevOps\genSample\node_modules\.bin\jest'; setting the 'outDir' or 'outFiles' attribute might help.
So after several iterations & looking around at similar issues, this is the launch.json section that's working for me:
{
"type": "node",
"request": "launch",
"name": "Debug test-v4 works-single-selected file",
"runtimeArgs": [
"--inspect-brk",
"${workspaceRoot}/node_modules/jest/bin/jest.js",
"--findRelatedTests",
"${relativeFile}",
"--env",
"jest-environment-node-debug",
"--runInBand"
],
"console": "integratedTerminal"
}
I tried various combinations of program = .../.bin/jest.cmd, .../jest/bin/jest.js yada yada- but did not hit on anything until the runtimeArgs vs program & args options setup.
Interested in your take, or if anyone else ran into something similar...
working env: Windows 10, TS 2.4.2, node 8.2.1, vs code latest.