Skip to content
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

Cannot debug jest tests using Node v8 #3748

Closed
mattmazzola opened this issue Jun 6, 2017 · 3 comments
Closed

Cannot debug jest tests using Node v8 #3748

mattmazzola opened this issue Jun 6, 2017 · 3 comments

Comments

@mattmazzola
Copy link

Do you want to request a feature or report a bug?
Both?
Bug: When debugging using Node v8 inspector protocol instead of legacy debug it does not hit breakpoints

The slim debugging docs: https://facebook.github.io/jest/docs/en/troubleshooting.html#content
mention to use --debug-brk so maybe jest is behaving as designed and not intended to work with Node v8 and in that case this would be feature request :)

Original issue was thought to be VScode jest configuration, but perhaps it's limitation with jest?
microsoft/vscode#28007

What is the current behavior?
When using Node v6.10 debugging works as expected
When using Node v8 debugger does not stop at debugger statements or breakpoints

If the current behavior is a bug, please provide the steps to reproduce and either a repl.it demo through https://repl.it/languages/jest or a minimal repository on GitHub that we can yarn install and yarn test.

What is the expected behavior?
When using Node v8 debugging

Please provide your exact Jest configuration and mention your Jest, node, yarn/npm version and operating system.
Jest: v19.0.2
Node: v6.10.3 (working) / v8 (not-working)
npm: 3.10.10
OS: Windows 10 (14393.1198)

...
"devDependencies": {
    "@types/jest": "^19.2.3",
    "@types/node": "^7.0.18",
    "jest": "^19.0.2",
    "ts-jest": "^19.0.14",
    "typescript": "^2.3.2"
  },
  "jest": {
    "testMatch": ["**/dist/**/?(*.)(spec|test).js?(x)"],
    "moduleFileExtensions": [
      "ts",
      "tsx",
      "js",
      "json"
    ]
  }

I couldn't get debugging to work on chrome so I setup debug from VSCode and things were good. Then it broke when I tried updating to node v8. I reverted back to Node v6.10 to confirm and opened the issue with VScode. They took a look and thought maybe an issue with jest.

I was hoping someone could just confirm the issue or link a project that does have debugging setup and works for node v8 that I can try out.

@maximderbin
Copy link
Contributor

#1652

@mattmazzola
Copy link
Author

Ah, I see. I guess this is duplicate of the referenced issue and since that is closed this one could also be closed. I'll go upvote the node issue and pray some node people take a look

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants