are you able to run jest test from command line? yes
how do you run your tests from command line? (for example: npm run test or node_modules/.bin/jest) copy-paste the line executed by vscode-jest:
cd /Users/ec/Sync/Code/excmd ; env CI=vscode-jest-tests /Users/ec/.nodenv/shims/node --inspect-brk=14995 node_modules/jest/bin/jest.js --runInBand parser.test.js --testNamePattern "parses a single command"
Relevant Debug Info
The only line in the Inspector console that appears to be jest-related:
spawning process with command=/Users/ec/Sync/Code/excmd/node_modules/.bin/jest, args=--json,--useStderr,--outputFile,/var/folders/xt/wm01x2h50nv993t_csb1t5qm0000gn/T/jest_runner.json,--watch,--no-color
(Unrelatedly: Every other output appears to be self-annotated by the relevant plugin with its' plugin-name; maybe add [jest] … to your log-lines?)
Clicking the ‘debug’ annotation on a broken test would launch a debugger, which then would stop executing at that test, or possibly on the exception generated during that test, even with “all exceptions”
Actual Behavior
I must be missing something, because without enabling stopping on caught exceptions, I just see the tests running in the debugger output, and then the process exits … and if I do turn on stop on caught exceptions (“all exceptions” in VScode), which can't be necessary (!?), then the debugger stops on a billion low-level Node control-flow constructs involving module-loading within Jest itself.
I'm assuming this is user-error, but I can't figure out what I've configured incorrectly. How do I simply debug one failing test?
Environment
node -v
: v10.12.0npm -v
: 6.9.0npm ls jest
: jest@23.5.0your vscode-jest settings if customized:
jest.pathToJest
? blankjest.pathToConfig
? blankOperating system: macOS 10.14.5
Prerequisite
how do you run your tests from command line? (for example:
npm run test
ornode_modules/.bin/jest
) copy-paste the line executed by vscode-jest:cd /Users/ec/Sync/Code/excmd ; env CI=vscode-jest-tests /Users/ec/.nodenv/shims/node --inspect-brk=14995 node_modules/jest/bin/jest.js --runInBand parser.test.js --testNamePattern "parses a single command"
Relevant Debug Info
The only line in the Inspector console that appears to be jest-related:
(Unrelatedly: Every other output appears to be self-annotated by the relevant plugin with its' plugin-name; maybe add
[jest] …
to your log-lines?)Here's my
launch.json
configuration:Expected Behavior
Clicking the ‘debug’ annotation on a broken test would launch a debugger, which then would stop executing at that test, or possibly on the exception generated during that test, even with “all exceptions”
Actual Behavior
I must be missing something, because without enabling stopping on caught exceptions, I just see the tests running in the debugger output, and then the process exits … and if I do turn on stop on caught exceptions (“all exceptions” in VScode), which can't be necessary (!?), then the debugger stops on a billion low-level Node control-flow constructs involving module-loading within Jest itself.
I'm assuming this is user-error, but I can't figure out what I've configured incorrectly. How do I simply debug one failing test?