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

Adding info about limitations in debugger statements in README #313

Merged
merged 3 commits into from
Sep 1, 2017
Merged

Adding info about limitations in debugger statements in README #313

merged 3 commits into from
Sep 1, 2017

Conversation

trivikr
Copy link
Contributor

@trivikr trivikr commented Sep 1, 2017

Suggestion in #309

Adding information about debugger statements not working in VSCode, and recommending users to use breakpoints.
Added link to limitations in debugger statements in the top index
README.md Outdated
@@ -286,6 +287,9 @@ If the `jest.mock()` calls is placed after actual code, (e.g. after functions or
the line numbers in stacktraces will be off.
We suggest placing the `jest.mock()` calls after the imports, but before any actual code.

### Current limitations for debugger statements
The `debugger`; statements do not work in VSCode, but breakpoints will map the TypeScript code correctly to the transpiled Javascript.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be the other way around - ''...will map the transpiled Javasript code correctly to the Typescript code"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just reused the same documentation which was removed couple of days back 9cb6f86#diff-04c6e90faac2675aa89e2176d2eec7d8

It works both ways I guess?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I quickly went through definitions of source maps online.
Generic definition suggests it's a mapping of compressed/transpiled code to source file as described here or here

I'll update the PR.

Updated mapping from JS to TS in the information about current limitations for debugger statements in README
@kulshekhar kulshekhar merged commit 95132fa into kulshekhar:master Sep 1, 2017
@trivikr trivikr deleted the patch-1 branch September 1, 2017 08:17
@tkrotoff
Copy link
Contributor

tkrotoff commented Sep 1, 2017

I've just tested with debugger statement and it works now thx to #311.
This PR should be reverted (please don't be as prompt to merge PR - let it be 24h so people can comment and/or the author can improve its PR).

ts-jest version 20.0.14 + outDir inside tsconfig.json + a file src/subdir/file.test.ts:

debugger

Everything works as expected. The issue was all about removing outDir from tsconfig.json inside ts-jest source code.
See also #309 (comment)

@trivikr
Copy link
Contributor Author

trivikr commented Sep 1, 2017

Thanks @tkrotoff
I've confirmed that both breakpoints and debugger statements work in VSCode in this private branch

Screen recording

I agree that this PR should be reverted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants