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

ts-jest (and maybe ts-node) files do not get source mapped when debugging. #1100

Closed
jakebailey opened this issue Sep 3, 2021 · 5 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release verified Verification succeeded

Comments

@jakebailey
Copy link
Member

Describe the bug

When we updated to 1.60 today, we noticed that we couldn't set breakpoints our tests anymore, or if they worked, they'd be on the wrong line, and anything we browsed was the unmapped code (not the original TS source).

To Reproduce

I have created a self-contained reproducer here: https://github.com/jakebailey/ts-jest-vsc-repro

Log File

vscode-debugadapter-2d0009e1.json.gz

VS Code Version: 1.60

Additional context
Add any other context about the problem here.

@jakebailey jakebailey added the bug Issue identified by VS Code Team member as probable bug label Sep 3, 2021
@connor4312
Copy link
Member

connor4312 commented Sep 4, 2021

Thanks for the issue and repro!

This is due to logic that we added to help with monorepos, where we default to resolving sourcemaps in the nearest package.json-containing directory relative to the program. In this case that meant we only resolve sourcemaps in node_modules/jest.

This'll be fixed in Monday's nightly debugger build. You can also explicitly set outFiles to its default value in your launch.json:

            "outFiles": [
                "${workspaceFolder}/**/*.js",
                "!**/node_modules/**"
            ]

Update: This will also be in the 1.60.1 patch release which we expect to land Monday the 13th

@connor4312 connor4312 added this to the September 2021 milestone Sep 4, 2021
@jakebailey
Copy link
Member Author

Given this regressed VSC 1.60 (which just came out), will this be backported or anything?

@connor4312
Copy link
Member

Yes I think I will introduce this as a candidate for 1.60.1.

@sandy081
Copy link
Member

sandy081 commented Sep 9, 2021

Changed to August 2021 recovery milestone so that we can track it from our queries.

@uk20931085

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants