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

Unable to Debug Jest tests with Typescript #30332

Closed
thekevinbrown opened this issue Jul 10, 2017 · 5 comments
Closed

Unable to Debug Jest tests with Typescript #30332

thekevinbrown opened this issue Jul 10, 2017 · 5 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues *duplicate Issue identified as a duplicate of another issue(s)

Comments

@thekevinbrown
Copy link

  • VSCode Version: Code 1.13.1 (379d2ef, 2017-06-14T18:13:05.928Z)
  • OS Version: Darwin x64 16.6.0
  • Extensions:
Extension Author Version
EditorConfig EditorConfig 0.9.3
npm-intellisense christian-kohler 1.3.0
tslint eg2 0.16.0
path-autocomplete ionutvmi 1.5.1
graphql-for-vscode kumar-harsh 1.4.2
debugger-for-chrome msjsdiag 3.1.6
vim vscodevim 0.9.0

Steps to Reproduce:

  1. Clone the reproduction case here: https://github.com/blargity/vscode-ts-jest-debugger
  2. Run yarn
  3. Try to run the Tests configuration in VSCode

Note: this is not the only configuration we've tried. Even setting inline source maps doesn't seem to do anything:

$ node --version
v8.1.2
$ npm --version
5.0.3
$ yarn --version
0.27.5
$ tsc --version
Version 2.4.1

I'd really appreciate any help I can get debugging this and figuring out how we can run our tests using the debugger. Once you get used to using the VSCode debugger you want to use it for everything!

@vscodebot vscodebot bot added the debug Debug viewlet, configurations, breakpoints, adapter issues label Jul 10, 2017
@thekevinbrown
Copy link
Author

Here's the trace from running that debugger task.
vscode-node-debug2.txt

@thekevinbrown
Copy link
Author

Just wanted to verify that the issue is a bit different in 1.14.1. It now runs, then stops, but my breakpoints aren't hit, and I see no output from Jest anywhere, so it doesn't look to me like it's running successfully. Here's an updated trace: vscode-node-debug2.txt

@weinand weinand added the bug Issue identified by VS Code Team member as probable bug label Jul 15, 2017
@roblourens
Copy link
Member

This is a known issue with Node. Using a version <8 might help: #28007 (comment)

@roblourens roblourens added the *duplicate Issue identified as a duplicate of another issue(s) label Jul 17, 2017
@thekevinbrown
Copy link
Author

I downgraded to 7.10.1 and still see no output from my tests in the terminal. I should see Jest output somewhere regardless of the debugger's ability to attach, right?

@roblourens
Copy link
Member

No, if the debugger can't attach, then it can't receive output from the program to display it in the console, but if you set"console": "integratedTerminal", then it will run jest in the integrated terminal and you'll see output there at least.

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues *duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

3 participants