mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 18:19:12 +01:00
add //#sourceUrl comment so that debugging worker extensions becomes easier
This commit is contained in:
@@ -50,7 +50,8 @@ export class ExtHostExtensionService extends AbstractExtHostExtensionService {
|
||||
}
|
||||
|
||||
// fetch JS sources as text and create a new function around it
|
||||
const initFn = new Function('module', 'exports', 'require', 'window', await response.text());
|
||||
const source = await response.text();
|
||||
const initFn = new Function('module', 'exports', 'require', 'window', `${source}\n//# sourceURL=${module.toString(true)}`);
|
||||
|
||||
// define commonjs globals: `module`, `exports`, and `require`
|
||||
const _exports = {};
|
||||
|
||||
Reference in New Issue
Block a user