Skip to content

Commit

Permalink
fix: sourcemaps not working in preloads in older Electron versions
Browse files Browse the repository at this point in the history
Fixes #1099
  • Loading branch information
connor4312 committed Sep 17, 2021
1 parent a201e73 commit 310d785
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ This changelog records changes to stable releases since 1.50.2. "TBA" changes he
- fix: remove redundant `__proto__` prop on recent V8 versions ([ref](https://github.com/microsoft/vscode/issues/130365))
- fix: debug ports being auto forwarded after detach ([#1092](https://github.com/microsoft/vscode-js-debug/issues/1092))
- fix: don't incorrectly scope sourcemap resolution to node_modules ([#1100](https://github.com/microsoft/vscode-js-debug/issues/1100))
- fix: sourcemaps not working in preloads in older Electron versions ([#1099](https://github.com/microsoft/vscode-js-debug/issues/1099))
- feat: add node_internals to skipFiles by default ([#1091](https://github.com/microsoft/vscode-js-debug/issues/1091))
- feat: allow using a .ps1 script as a runtimeExectuable ([#1093](https://github.com/microsoft/vscode-js-debug/issues/1093))
- feat: avoid attaching to scripts in .rc files ([ref](https://github.com/microsoft/vscode/issues/127717))
Expand Down
5 changes: 5 additions & 0 deletions src/adapter/threads.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1102,6 +1102,11 @@ export class Thread implements IVariableStoreDelegate {
return;
}

// normalize paths paths that old Electron versions can add (#1099)
if (urlUtils.isAbsolute(event.url)) {
event.url = urlUtils.absolutePathToFileUrl(event.url);
}

if (this._sourceContainer.scriptsById.has(event.scriptId)) {
return;
}
Expand Down

0 comments on commit 310d785

Please sign in to comment.