Archived
1
0

Fix debugging

This commit is contained in:
Kyle Carberry
2019-03-19 12:53:05 -04:00
parent 277c6cb690
commit 2169045377
2 changed files with 18 additions and 11 deletions

View File

@ -46,12 +46,13 @@ export const requireFork = (modulePath: string, args: string[], builtInExtension
const Module = require("module") as typeof import("module");
const oldRequire = Module.prototype.require;
// tslint:disable-next-line:no-any
Module.prototype.require = (id: string): any => {
Module.prototype.require = function (id: string): any {
if (id === "typescript") {
return require("typescript");
}
return oldRequire(id);
// tslint:disable-next-line:no-any
return oldRequire.call(this, id as any);
};
if (!process.send) {
@ -59,7 +60,6 @@ export const requireFork = (modulePath: string, args: string[], builtInExtension
}
process.argv = ["", "", ...args];
requireFilesystemModule(modulePath, builtInExtensionsDir);
if (ipcMsgBuffer && ipcMsgListener) {