vscode-jest-runner
vscode-jest-runner copied to clipboard
Setting "Jest Command" is ignored for Debug
The setting works for non-Debug.
"node_modules/jest/bin/jest.js" is always run instead when trying to Debug.
I have the same issue.
same issue here - any thoughts on how to fix this?
@westonNexben jest command is ignored because 'node' is used as executable: https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_launch-configuration-support-for-npm-and-other-tools
It is possible to override arguments by defining runtimeArgs
and args
inside debugOptions, for example:
"jestrunner.debugOptions": {
"args": ["--no-cache"],
"runtimeArgs": [
"-r", "tsconfig-paths/register"
]
}
Currently, jestrunner.jestCommand
is not used in debug 👍
I think the closest equivalent is runtimeExecutable
, which can be configured like this (see also CRA example in the readme):
"jestrunner.debugOptions": {
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/react-scripts",
}
Does it solve the use cases if runtimeExecutable
is set to the same value as jestrunner.jestCommand
?
Also the debug button is a launch
configuration, the options are documented here:
https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_launch-configuration-attributes