-
Notifications
You must be signed in to change notification settings - Fork 450
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
The debugger doesn't stop at debugger; statement in VSCode in source files when using Node v8.4.0 #309
Comments
While debugging, I put a breakpoint at Lines 37 to 40 in a67fa3e
The {
"target": 4,
"module": 1,
"moduleResolution": 2,
"outDir": "/Users/trivikr/workspace/ts-jest-node8-debugger-repro/build/",
"inlineSourceMap": true,
"inlineSources": true,
"jsx": 2
} and when SystemUnderTest.ts is being transpiled {
"target": 4,
"module": 1,
"moduleResolution": 2,
"inlineSourceMap": true,
"inlineSources": true,
"jsx": 2
} When transpiling source files, the outDir parameter is not present. |
The parameter Lines 187 to 191 in a67fa3e
However, the issue still exists if this code is removed. |
Does it work with breakpoints? In general vscode isn't particularly fond of jest preprocessors for some reason. |
It's funny, the debugger; statements work in Test files and breakpoints work in source files. Is it possible to find out why breakpoints work in source files and implement it for test files? |
@GeeWee The breakpoints will work in VSCode for test files if Lines 187 to 191 in 64bbc6e
Is there some reason why |
That's.. really weird haha. I think that's before my time - perhaps @kulshekhar can weigh in? |
@kulshekhar and @GeeWee: I've created my first ever Open Source Contribution PR at #311 |
I confirm this problem. Reproduction: a project containing a file
To sum up, the problem happens when you have a subdirectory and See also #313 (comment) (1) file.test.ts: new Promise((resolve, reject) => {
reject(new Error(''));
}); |
Thanks @tkrotoff for reproducing and confirming this error. The fix in PR #311 fixes the issue with breakpoints in both source and test files in VSCode for files in both rootDir and sub-directories. |
iirc, it was done this way because |
Can we document the debugger statements not working before we close this? |
I agree with @GeeWee that README.md should have information about debugger; statements are not working. It's funny that the documentation about breakpoints not working (and prefer debugger statements) in VSCode was removed just two days back :P 9cb6f86#diff-04c6e90faac2675aa89e2176d2eec7d8 |
@trivikr Isn't this because you're using version 20.0.13? |
@kulshekhar @GeeWee I cloned the repo and I think it's working with |
@trivikr can you confirm this so that we can then revert the documentation change that was merged earlier? |
Thanks @morajabi for verifying the fix! @kulshekhar Yes, we can revert the documentation change done in #313 |
Issue
The debugger doesn't stop at debugger; statement in VSCode in source files when using Node v8.4.0
The earlier issue discussed in The debugger doesn't stop at debugger; statement in VSCode with TypeScript compilerOptions.target="es2017" #299 is was with test files, and is fixed in v20.0.13 with PR Always set inlineSources and inlineSourceMap to true #306
This issue is with source files.
Expected behavior
The debugger should stop at debugger; in VSCode for source files
Link to a minimal repo that reproduces this issue
ts-jest-node8-debugger-repro
Optional (but highly recommended) - Configure Travis (or your favorite system) with the minimal repo
Done
The text was updated successfully, but these errors were encountered: