Skip to content

Commit

Permalink
fix: apply sourceMapPathOverrides to file URIs (#2109)
Browse files Browse the repository at this point in the history
  • Loading branch information
connor4312 authored Oct 21, 2024
1 parent 75f6a52 commit 27839c9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
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

0 comments on commit 27839c9

Please # to comment.