-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Latest upgrade to Version 1.19.1 (1.19.1) breaks Jest Test Debugging Capabilities #40896
Comments
duplicate of #40254. The launch config from Jest's website is wrong. {
"name": "Debug CRA Tests",
"type": "node",
"request": "launch",
"runtimeExecutable": "${workspaceRoot}/client/node_modules/.bin/react-scripts",
"args": [ "test", "--runInBand", "--no-cache", "--env=jsdom" ],
"cwd": "${workspaceRoot}/client",
"protocol": "inspector",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
} |
I can confirm the above solution works 👌 Thank you kindly for your time @weinand |
For those that ended up here because VSCode debugging for jest on windows STILL doesn't work, try the following: {
"name": "Debug Jest Tests",
"type": "node",
"request": "launch",
"runtimeArgs": [
"--inspect-brk=5555",
"${workspaceRoot}/node_modules/jest/bin/jest.js"
],
"args": [
"--runInBand",
],
"port": 5555,
"protocol": "inspector",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
} |
@Phlow2001 this (simpler) launch config should be equivalent for VS Code > 1.19: {
"name": "Debug Jest Tests",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/node_modules/jest/bin/jest.js",
"args": [
"--runInBand",
],
"protocol": "inspector",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
} And you only need the "protocol" attribute if you are using node.js < 8.0 |
Hi there, I suspect the newest update might be breaking the Jest debugging. Here's my config taken straight from Jest's website: .
Note: I'm using the CRA setup
Steps to Reproduce:
When I try to start debugging (which I can confirm was working with previous versions) I now get the error:
Error: Cannot connect to runtime process, timeout after 10000 ms - (reason: Cannot connect to the target: connect ECONNREFUSED 127.0.0.1:3269)
.Could you please point me to what I'm missing?
💭
🤔
The text was updated successfully, but these errors were encountered: