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

Include columnOffset for jest Script creation #14

Closed
wants to merge 2 commits into from

Conversation

BobdenOs
Copy link
Contributor

When Jest compiles a file it does not forward the size of the module wrapper to node. This causes issue in the node debugger source map logic. As it cannot resolve the source file as the filesystem contains different code then the compiled Script. By adding the offset the contents match up again and the editor will not open an read only window anymore.

Using the normal Jest babel configuration breaks a lot of debugging information all values on hover and inside the debug console are not the actual value they should be. Which means that it is not possible to copy a line from the source file and run it directly in the debug console. As the moment a property is selected the root value has become the value of the property.

Also tried to make a PR to Jest directly, but not certain about the Corporate relation between SAP and Facebook. jestjs/jest#14148

@David-Kunz
Copy link
Contributor

David-Kunz commented May 19, 2023

By adding the offset the contents match up again and the editor will not open an read only window anymore.

That's the reason I still use the old debug adapter as opposed to the one used in VSCode.

It would be great if Jest could fix that with your PR.

@BobdenOs
Copy link
Contributor Author

fixed in jest instead

@BobdenOs BobdenOs closed this Sep 14, 2023
@patricebender patricebender deleted the fix-jest-debugging branch October 12, 2023 08:34
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

2 participants