Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: apply sourceMapPathOverrides to file URIs #2109

Merged
merged 1 commit into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ This changelog records changes to stable releases since 1.50.2. "TBA" changes he

## Nightly (only)

- fix: apply sourceMapPathOverrides to file URIs ([vscode-dwarf-debugging-ext#7](https://github.com/microsoft/vscode-dwarf-debugging-ext/issues/7))
- fix: allow hitting breakpoints early in webassembly ([vscode#230875](https://github.com/microsoft/vscode/issues/230875))
- fix: only autofill "debug link" input if the hostname resolves ([vscode#228950](https://github.com/microsoft/vscode/issues/228950))
- fix: support ANSI colorization in stdout logged strings ([vscode#230441](https://github.com/microsoft/vscode/issues/230441))
Expand Down
9 changes: 5 additions & 4 deletions src/targets/browser/browserPathResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ export class BrowserSourcePathResolver extends SourcePathResolverBase<IOptions>
return;
}

// It's possible the source might be using the `sourceURL`, so apply
// any source map overrides now (fixes vscode#204784) and before file
// URIs (vscode-dwarf-debugging-ext#7)
url = this.sourceMapOverrides.apply(url);

// If we have a file URL, we know it's absolute already and points
// to a location on disk.
if (utils.isFileUrl(url)) {
Expand All @@ -119,10 +124,6 @@ export class BrowserSourcePathResolver extends SourcePathResolverBase<IOptions>
return abs;
}

// It's possible the source might be using the `sourceURL`, so apply
// any source map overrides now (fixes vscode#204784)
url = this.sourceMapOverrides.apply(url);

let pathname: string;
try {
const parsed = new URL(url);
Expand Down
Loading