Skip to content

Commit 310d785

Browse files
committed
fix: sourcemaps not working in preloads in older Electron versions
Fixes #1099
1 parent a201e73 commit 310d785

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ This changelog records changes to stable releases since 1.50.2. "TBA" changes he
88
- fix: remove redundant `__proto__` prop on recent V8 versions ([ref](https://github.com/microsoft/vscode/issues/130365))
99
- fix: debug ports being auto forwarded after detach ([#1092](https://github.com/microsoft/vscode-js-debug/issues/1092))
1010
- fix: don't incorrectly scope sourcemap resolution to node_modules ([#1100](https://github.com/microsoft/vscode-js-debug/issues/1100))
11+
- fix: sourcemaps not working in preloads in older Electron versions ([#1099](https://github.com/microsoft/vscode-js-debug/issues/1099))
1112
- feat: add node_internals to skipFiles by default ([#1091](https://github.com/microsoft/vscode-js-debug/issues/1091))
1213
- feat: allow using a .ps1 script as a runtimeExectuable ([#1093](https://github.com/microsoft/vscode-js-debug/issues/1093))
1314
- feat: avoid attaching to scripts in .rc files ([ref](https://github.com/microsoft/vscode/issues/127717))

src/adapter/threads.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,6 +1102,11 @@ export class Thread implements IVariableStoreDelegate {
11021102
return;
11031103
}
11041104

1105+
// normalize paths paths that old Electron versions can add (#1099)
1106+
if (urlUtils.isAbsolute(event.url)) {
1107+
event.url = urlUtils.absolutePathToFileUrl(event.url);
1108+
}
1109+
11051110
if (this._sourceContainer.scriptsById.has(event.scriptId)) {
11061111
return;
11071112
}

0 commit comments

Comments
 (0)