Open milahu opened 1 year ago
@milahu yes, they are loaded only if you open the Developer Tools in the Help menu. Should we keep them? I don't know.
also some stack traces will (try to) fetch these sourcemaps
sourcemaps are useful for debugging, so ideally, prefetch the sourcemaps on build, and patch the urls
some stack traces will (try to) fetch these sourcemaps
... to ${workdir}/sourcemaps
, but this fails in my case
debug console:
Could not read source map for file:///nix/store/xzpplq37c76fnjyl3nzgwdpb038yqvhx-vscodium-1.72.0.22279/lib/vscode/resources/app/out/vs/loader.js: ENOENT: no such file or directory, open '/tmp/project/sourcemaps/9f4a41aac91eb148c23b6956be66db333af2d3a2/core/vs/loader.js.map'
... caused by debugging an vscode extension (vscode-nix-ide)
To be useful, the sourcemaps need to hosted somewhere since MS don't include them since they would increase the install size of the app.
vscodium should work offline
Since the url needs to be hardcoded, to use a local url would be difficult (for all systems). And the weight of those files can be an issue to include them adhoc.
It only an issue to debug vscode or one of its components.
Since the url needs to be hardcoded, to use a local url would be difficult (for all systems)
sourceMappingURL
can be a filename, then its relative to dirname
MS don't include them since they would increase the install size of the app.
maybe we can compress them as .js.map.gz?
but there is another problem ...
all URLs produce HTTP 404, because sourcemaps are only generated in macos builds, and there is no macos build for my vscode versions
https://github.com/microsoft/vscode/issues/39824 https://github.com/Microsoft/vscode/issues/43487
sourceMappingURL
can be a filename, then its relative to dirname
I know... but the app is installed at different locations. Unless if we can specify a standard location like the user profile or in the same directory as the extensions, it will be difficult.
Then, you will need to download a tar.gz
or zip
file and uncompress the maps to that location.
Maybe a script that do all of that??? Locate the app, get the version, download the maps and update the urls.... ???
Hum, Snap, AppImage and macOS might be an issue.
all URLs produce HTTP 404, because sourcemaps are only generated in macos builds, and there is no macos build for my vscode versions
Yeah, I forgot... it must be linked the BUILD_SOURCEVERSION which is now different between VSCode and VSCodium (due to the release number) So a solution is needed, either remove them or find a solution to have them locally...
So a solution is needed, either remove them or find a solution to have them locally...
Generating them with the CI build and ideally have them uploaded along with changing the URL. Additional: a script that change the URLs to the home directory and the option to download them packed.
... wishful thinking ...
One may just turn off "Enable JavaScript source maps" in the Chromium Dev Tools settings:
This is electron.devtools.preferences.jsSourceMapsEnabled: "true" | "false"
(yes, string),
in the <user data directory, see this>/Preferences
file, a JSON file without a proper .json
suffix.
Since we have good reasons, maybe we can just preload this preference and tell user about this change somewhere.
To be useful, the sourcemaps need to hosted somewhere since MS don't include them since they would increase the install size of the app.
vscodium should work offline
Since the url needs to be hardcoded, to use a local url would be difficult (for all systems). And the weight of those files can be an issue to include them adhoc.
It only an issue to debug vscode or one of its components.
I think this needs to be an option- I can't debug my vscodium without these source maps, so they should be included. For the VSCodium that's downloadable on GitHub, we can assume nobody will use the source map so the sourceMappingURL line can be removed, or the domain name replaced with a .invalid
domain.
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment, and we'll keep it open. If you have any new additional information, please include it with your comment!
+1
but there is another problem ...
all URLs produce HTTP 404, because sourcemaps are only generated in macos builds
or you know... build vscodium from source #887 #420
one downside is the long build time
this could be reduced by replacing tsc
with swc
, see also https://github.com/microsoft/vscode/pull/163660
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment, and we'll keep it open. If you have any new additional information, please include it with your comment!
+1
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment, and we'll keep it open. If you have any new additional information, please include it with your comment!
still an issue
Describe the bug
many javascript files in
lib/vscode/resources/
have online sourcemapsexample:
this is unwanted because
Please confirm that this problem is VSCodium-specific
Please confirm that the issue/resolution isn't already documented
Additional context Add any other context about the problem here.
on nixos linux ...
vscodium-online-sourcemaps.txt