You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 16, 2021. It is now read-only.
When using ts_library, it will produces source maps to bazels symlinked version of files that live in bazel-bin.
The source maps should point to your real source, not the ones in bazel-bin
When your target is the browser this isn't an issue since the browser can resolve the source maps and host it without a problems. This change will also have no affect here.
When your target is nodejs (nodejs_binary) this causes issues when trying to debug those files.
Breakpoints inserted via IDE such as Visual Studio Code don't work.
If you attach to a nodejs process via VSC you should be able to use it's breapoints feature just like you can in chrome, but if you place the breakpoint on the "real" file then it wont work since that's not the sourcemap's target. You must instead use debugger, then if you attach and hit the breakpoint VSC will open the sourcemapped file, once in the source mapped files you can then use breakpoints as expected
tsserver does not handle working with the bazel-bin files.
Once you start debugging the sourcemapped files tsserver (TS's language support server) TS support in VSC will start dropping out, eventually to the point where you get no support at all, autocomplete will be gone, error marking also, if you inspect your processes then tsserver will be running at 100% constantly in (I assume) an attampt to re-process all the files in bazel-bin aswell as you real source files, possibly without bounds (include/exclude).
This issue here i've only noticed being distruptive lately at a codebase size of about 30K LOC, so if it were a big code base I don't see how this could scale.
The text was updated successfully, but these errors were encountered:
Yeah there are a cluster of issues around this right now. Since @mprobst is back and could probably help us understand the correct thing to do, I put this one on our bug bash sprint which starts Tuesday.
We have started fixing sourcemaps in other contexts, by post-processing the diagnostics after the tool produces them based on paths it observed during compilation. Probably the right thing to do here too
When using
ts_library
, it will produces source maps to bazels symlinked version of files that live inbazel-bin
.The source maps should point to your real source, not the ones in
bazel-bin
When your target is the browser this isn't an issue since the browser can resolve the source maps and host it without a problems. This change will also have no affect here.
When your target is nodejs (nodejs_binary) this causes issues when trying to debug those files.
Breakpoints inserted via IDE such as Visual Studio Code don't work.
If you attach to a nodejs process via VSC you should be able to use it's breapoints feature just like you can in chrome, but if you place the breakpoint on the "real" file then it wont work since that's not the sourcemap's target. You must instead use
debugger
, then if you attach and hit the breakpoint VSC will open the sourcemapped file, once in the source mapped files you can then use breakpoints as expectedtsserver does not handle working with the bazel-bin files.
Once you start debugging the sourcemapped files tsserver (TS's language support server) TS support in VSC will start dropping out, eventually to the point where you get no support at all, autocomplete will be gone, error marking also, if you inspect your processes then tsserver will be running at 100% constantly in (I assume) an attampt to re-process all the files in bazel-bin aswell as you real source files, possibly without bounds (include/exclude).
This issue here i've only noticed being distruptive lately at a codebase size of about 30K LOC, so if it were a big code base I don't see how this could scale.
The text was updated successfully, but these errors were encountered: