Source maps and breakpoints read correctly but app hangs and breakpoint is never hit
See original GitHub issueDescribe the bug I’m running Typescript tests using @web/test-runner with esbuild transpiling the typescript on the fly and providing inline source maps.
It’s a bit strange in that the compiled JS is not on disk so we end up with web background.ts
mapping to on disk background.ts
. Similar set ups have worked in the past so I’m thinking a subtle issue is preventing breakpoints from firing.
(If there are no breakpoints, then the tests run fine and the test which don’t contain a breakpoint will also run fine while the final test hangs until I restart)
The diagnostic tool shows everything as expected except that the top level files seem to be absolute paths printed relative to my workspace directory. I assume that’s a diagnostic tool only bug since the detailed paths are exactly right.
I’m hoping the log files make the problem obvious but I can push a branch to my repo for easy debugging if needed later.
Log File vscode-debugadapter-be9fedb0.json.gz
VS Code Version:
バージョン: 1.63.2 (system setup) コミット: 899d46d82c4c95423fb7e10e68eba52050e30ba3 日付: 2021-12-15T09:40:02.816Z Electron: 13.5.2 Chromium: 91.0.4472.164 Node.js: 14.16.0 V8: 9.1.269.39-electron.0 OS: Windows_NT x64 10.0.19043
Additional context I’m running remote WSL with debian based linux though it’s probably not related.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (2 by maintainers)
Top GitHub Comments
Sure, you can use any old version of the nightly build
I got caught up in work but came back to this recently. I’ll continue recording my progress here for future readers. To reduce variables I removed the realtime transpilation and ran my tests pre-compiled.
I noticed first that, if sourcemaps were off then there was no crash. Then I tried to figure out which source maps caused it by looking at all my deps.
I found that in order for it to not crash in this case, I had to remove the inline sourcemaps of two of my sourcefiles. It has to be both, if i just remove one or the other, the crash still occurs. The odd part is that the breakpoint is not related to these files and so even though the files are loaded via imports analyzing the sourcemaps would not be needed for placing a breakpoint.
Even though the crash is in chrome, I wonder if it could be caused by a malformed command due to an improperly read sourcemap…