vscode-js-debug: Turbo sourcemaps not hitting TS breakpoints in imported modules
I believe this issue is in relation to the new debugger optimizations in patch 1.75 last week
When the patch hit last week we were unable to put breakpoints into ‘*.ts’ files in imported modules and have them hit. We’re running a lerna monorepo if that’s useful.
- Breakpoints on the ‘*.ts’ files in the package we execute the code did work.
- Breakpoints on the ‘*.js’ files in our
/dist/
folders for both the original package and the imported ones did hit correctly. - Breakpoints on any ‘*.ts’ files from imported modules did not fire.
- Adding
"enableTurboSourcemaps": false
to ourlaunch.json
file fixes the issue
I’m not sure what would be helpful to debug this but here is my profile from launch.json
{
"name": "🚀 GQL Lambda API: (RUN)",
"type": "node",
"request": "launch",
"runtimeArgs": [
"-r",
"ts-node/register"
],
"cwd": "${workspaceRoot}",
"console": "integratedTerminal",
"program": "${workspaceFolder}/src/servers.ts",
"sourceMaps": true,
"enableTurboSourcemaps": false, // this fixed the issue
"envFile": "${workspaceFolder}/../../.env.local.${input:environment}",
"outFiles": [
"${workspaceFolder}/../dist/**/*.js",
"!**/node_modules/**"
],
},
This worked flawlessly until VSCode updated last week. The note in the changelog said enableTurboSourcemaps
will eventually be depprecated so obviously we’d like to see some kind of resolution to the issue before that happens.
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 4
- Comments: 20 (11 by maintainers)
Commits related to this issue
- fix: resolveSourceMapLocations not being auto-filled for ext host debug See https://github.com/microsoft/vscode-js-debug/issues/1554\#issuecomment-1420520834 — committed to microsoft/vscode-js-debug by connor4312 a year ago
- fix: resolveSourceMapLocations not being auto-filled for ext host debug (#1568) See https://github.com/microsoft/vscode-js-debug/issues/1554\#issuecomment-1420520834 — committed to microsoft/vscode-js-debug by connor4312 a year ago
- fix: source map resolution in parent workspace folder paths not working Fixes https://github.com/microsoft/vscode-js-debug/issues/1554#issuecomment-1420520834 — committed to microsoft/vscode-js-debug by connor4312 a year ago
Will send it again from my private mail account … give me a minute …
You probably have a different issue then. Please collect a trace log using the instructions I shared above and I can look into it.
Thanks for the log, that actually is an issue that regressed last month 😄
@segevfiner thanks for the repro. The issue you’re hitting is specific to extension host debugging, and I’m not sure why it would have worked before. But that’ll be fixed in the next nightly build.
@MattReimer I’m not able to repro the issue with multiple glob stars in isolation.
For others, please provide either similar repros, or log files using the instructions given in the “bug” issue template:
Here’s another interesting datapoint:
It seems like when there’s a double
**
in my output files inlaunch.json
it won’t work.So this doesn’t work:
But this DOES work.
I wonder if
**/something/**
is forbidden or somethingMWE/reproduction: https://github.com/segevfiner/vscode-js-debug-bug
Try breaking in app.ts (Code in the server)