diff --git a/src/bootstrap.js b/src/bootstrap.js index 3f94abadd31..dad68bf5c80 100644 --- a/src/bootstrap.js +++ b/src/bootstrap.js @@ -103,13 +103,15 @@ if (!process.env['VSCODE_ALLOW_IO']) { process.__defineGetter__('stdin', function () { return writable; }); } -// Handle uncaught exceptions -process.on('uncaughtException', function (err) { - console.error('Uncaught Exception: ', err.toString()); - if (err.stack) { - console.error(err.stack); - } -}); +if (!process.env['VSCODE_HANDLES_UNCAUGHT_ERRORS']) { + // Handle uncaught exceptions + process.on('uncaughtException', function (err) { + console.error('Uncaught Exception: ', err.toString()); + if (err.stack) { + console.error(err.stack); + } + }); +} // Kill oneself if one's parent dies. Much drama. if (process.env['VSCODE_PARENT_PID']) { @@ -138,4 +140,4 @@ if (typeof crashReporterOptionsRaw === 'string') { } } -require('./bootstrap-amd').bootstrap(process.env['AMD_ENTRYPOINT']); \ No newline at end of file +require('./bootstrap-amd').bootstrap(process.env['AMD_ENTRYPOINT']); diff --git a/src/vs/workbench/services/extensions/electron-browser/extensionHost.ts b/src/vs/workbench/services/extensions/electron-browser/extensionHost.ts index a932aa054e3..b107064177a 100644 --- a/src/vs/workbench/services/extensions/electron-browser/extensionHost.ts +++ b/src/vs/workbench/services/extensions/electron-browser/extensionHost.ts @@ -141,6 +141,7 @@ export class ExtensionHostProcessWorker { VERBOSE_LOGGING: true, VSCODE_WINDOW_ID: String(this._windowService.getCurrentWindowId()), VSCODE_IPC_HOOK_EXTHOST: pipeName, + VSCODE_HANDLES_UNCAUGHT_ERRORS: true, ELECTRON_NO_ASAR: '1' }), // We only detach the extension host on windows. Linux and Mac orphan by default