提交 a7fcaffc 编写于 作者: A Alex Dima

Do not install the watchdog if the extension host is debuggable (#26445)

上级 e5943cbc
...@@ -48,6 +48,7 @@ import { ITreeItem } from 'vs/workbench/parts/views/common/views'; ...@@ -48,6 +48,7 @@ import { ITreeItem } from 'vs/workbench/parts/views/common/views';
import { ThemeColor } from 'vs/platform/theme/common/themeService'; import { ThemeColor } from 'vs/platform/theme/common/themeService';
export interface IEnvironment { export interface IEnvironment {
isExtensionDevelopmentDebug: boolean;
enableProposedApiForAll: boolean; enableProposedApiForAll: boolean;
enableProposedApiFor: string | string[]; enableProposedApiFor: string | string[];
appSettingsHome: string; appSettingsHome: string;
......
...@@ -291,9 +291,10 @@ export class ExtensionHostProcessWorker { ...@@ -291,9 +291,10 @@ export class ExtensionHostProcessWorker {
private createExtHostInitData(): TPromise<IInitData> { private createExtHostInitData(): TPromise<IInitData> {
return TPromise.join<any>([this.telemetryService.getTelemetryInfo(), this.extensionService.getExtensions()]).then(([telemetryInfo, extensionDescriptions]) => { return TPromise.join<any>([this.telemetryService.getTelemetryInfo(), this.extensionService.getExtensions()]).then(([telemetryInfo, extensionDescriptions]) => {
return <IInitData>{ let r: IInitData = {
parentPid: process.pid, parentPid: process.pid,
environment: { environment: {
isExtensionDevelopmentDebug: this.isExtensionDevelopmentDebug,
appSettingsHome: this.environmentService.appSettingsHome, appSettingsHome: this.environmentService.appSettingsHome,
disableExtensions: this.environmentService.disableExtensions, disableExtensions: this.environmentService.disableExtensions,
userExtensionsHome: this.environmentService.extensionsPath, userExtensionsHome: this.environmentService.extensionsPath,
...@@ -308,6 +309,7 @@ export class ExtensionHostProcessWorker { ...@@ -308,6 +309,7 @@ export class ExtensionHostProcessWorker {
configuration: this.configurationService.getConfigurationData(), configuration: this.configurationService.getConfigurationData(),
telemetryInfo telemetryInfo
}; };
return r;
}); });
} }
......
...@@ -54,7 +54,9 @@ export class ExtensionHostMain { ...@@ -54,7 +54,9 @@ export class ExtensionHostMain {
errors.setUnexpectedErrorHandler(err => mainThreadErrors.onUnexpectedExtHostError(errors.transformErrorForSerialization(err))); 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 // 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<void> { public start(): TPromise<void> {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册