From a7fcaffcf4ee0ffbc3ee8dd27f7ea1fa4c78cc60 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Mon, 14 Aug 2017 14:26:31 +0200 Subject: [PATCH] Do not install the watchdog if the extension host is debuggable (#26445) --- src/vs/workbench/api/node/extHost.protocol.ts | 1 + src/vs/workbench/electron-browser/extensionHost.ts | 4 +++- src/vs/workbench/node/extensionHostMain.ts | 4 +++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index 43cdb8f320e..f031648f17c 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -48,6 +48,7 @@ import { ITreeItem } from 'vs/workbench/parts/views/common/views'; import { ThemeColor } from 'vs/platform/theme/common/themeService'; export interface IEnvironment { + isExtensionDevelopmentDebug: boolean; enableProposedApiForAll: boolean; enableProposedApiFor: string | string[]; appSettingsHome: string; diff --git a/src/vs/workbench/electron-browser/extensionHost.ts b/src/vs/workbench/electron-browser/extensionHost.ts index 187a6018b89..fea8c3c48de 100644 --- a/src/vs/workbench/electron-browser/extensionHost.ts +++ b/src/vs/workbench/electron-browser/extensionHost.ts @@ -291,9 +291,10 @@ export class ExtensionHostProcessWorker { private createExtHostInitData(): TPromise { return TPromise.join([this.telemetryService.getTelemetryInfo(), this.extensionService.getExtensions()]).then(([telemetryInfo, extensionDescriptions]) => { - return { + let r: IInitData = { parentPid: process.pid, environment: { + isExtensionDevelopmentDebug: this.isExtensionDevelopmentDebug, appSettingsHome: this.environmentService.appSettingsHome, disableExtensions: this.environmentService.disableExtensions, userExtensionsHome: this.environmentService.extensionsPath, @@ -308,6 +309,7 @@ export class ExtensionHostProcessWorker { configuration: this.configurationService.getConfigurationData(), telemetryInfo }; + return r; }); } diff --git a/src/vs/workbench/node/extensionHostMain.ts b/src/vs/workbench/node/extensionHostMain.ts index 070e70b1d70..c5f8cdb8a9c 100644 --- a/src/vs/workbench/node/extensionHostMain.ts +++ b/src/vs/workbench/node/extensionHostMain.ts @@ -54,7 +54,9 @@ export class ExtensionHostMain { errors.setUnexpectedErrorHandler(err => mainThreadErrors.onUnexpectedExtHostError(errors.transformErrorForSerialization(err))); // Configure the watchdog to kill our process if the JS event loop is unresponsive for more than 10s - watchdog.start(10000); + if (!initData.environment.isExtensionDevelopmentDebug) { + watchdog.start(10000); + } } public start(): TPromise { -- GitLab