-
Notifications
You must be signed in to change notification settings - Fork 59
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
stepping into code debugging source not working #2
Comments
it seeems to not account for the extra lines between the functions in the real class that your testing. If you were to put a bunch of new lines between the methods, you'll clearly see the issue with the break points not lining up |
You really have to report this to the |
Sure thing, I can post it on ts-jest. I just wasn't sure if i'ts related to ts-jest, or vs code or even to the node version. Since it works from command line. Just wanted to get your perspective if I was missing something in how ts-jest should be configured. Thanks anyways |
Also I believe it's related to the codecoverage being set to true. There is a bug related to debugging when coverage is turned on. After i fixed that, it seemed to work |
Hi,
So i had two issue initially when i ran your example. One was addressed here #1 with the fix of adding a different configuration in launch.
Afterwards, I wrote some extra code and tried to step into it. However, whenever i stepped into the method it would not line up or it would be off by a line. I'm guessing there is some is something i'm missing about the source mapping.
https://github.com/darewreck54/ts-jest-sample
if you run this repo, and put a break point at line 29 sound-consumer.spec.ts and step into it, you'll notice that you are off by a line. It will jump to the file, but be one line offset of where it should be.
Also if you update the version of
"devDependencies": {
"@types/jest": "^23.0.0",
"jest": "^23.1.0",
"typescript": "^2.9.1"
},
"scripts": {
"compile": "tsc",
"test": "jest"
},
"dependencies": {
"ts-jest": "^22.4.6"
}
and run it again, you will notice that when you step into the same file, it will be way off; whether its stepping into the contructor of SoundPlayerConsumer or when you step into the method playSoundFile
i'm currently using npm 6.1.0 and node 8.11.2
Any idea how to fix the source mapping issue?
Thanks,
Derek
The text was updated successfully, but these errors were encountered: