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

source maps from packages in node_modules don't work in the debugger #240356

Open
DetachHead opened this issue Feb 11, 2025 · 0 comments
Open

source maps from packages in node_modules don't work in the debugger #240356

DetachHead opened this issue Feb 11, 2025 · 0 comments
Assignees

Comments

@DetachHead
Copy link
Contributor

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: 1.97.0
  • OS Version: windows 10

this was originally raised at nodejs/node#45196 a couple years ago but i was told it's an issue with vscode not nodejs. i've confirmed the issue still occurs on the latest vscode and node versions

Version

v18.10.0

Platform

Microsoft Windows NT 10.0.19044.0 x64

Subsystem

No response

What steps will reproduce the bug?

  1. create a .ts file that imports from a package that includes the source code and source maps, for example:
    // main.ts
    import { exactly } from '@detachhead/ts-helpers/dist/functions/misc'
    exactly(1 as number, 2 as number)
  2. compile it with typescript: tsc main.ts --sourcemap
  3. in vscode, set a breakpoint on the exactly function call
  4. run it with the nodejs debug console in vscode: node main.js
  5. when the breakpoint is reached, hit F11 to step into the function

How often does it reproduce? Is there a required condition?

every time

What is the expected behavior?

steps into the source code located at ./node_modules/@detachhead/ts-helpers/src/functions/misc.ts, as the @detachhead/ts-helpers package includes its source code and source maps

What do you see instead?

stepped into compiled .js file
image

Additional information

debugging in webstorm produces a slightly different result. instead of stepping into the .js file when pressing "step into", it just steps over instead

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

No branches or pull requests

2 participants