cli: debugBrkExtensionHost => debugBrkPluginHost
This commit is contained in:
parent
f270163670
commit
a0b8579547
7 changed files with 17 additions and 9 deletions
|
@ -30,7 +30,7 @@ export interface IProcessEnvironment {
|
||||||
export interface ICommandLineArguments {
|
export interface ICommandLineArguments {
|
||||||
verbose: boolean;
|
verbose: boolean;
|
||||||
debugPluginHost: string;
|
debugPluginHost: string;
|
||||||
debugBrkExtensionHost: boolean;
|
debugBrkPluginHost: boolean;
|
||||||
debugBrkFileWatcherPort: number;
|
debugBrkFileWatcherPort: number;
|
||||||
logExtensionHostCommunication: boolean;
|
logExtensionHostCommunication: boolean;
|
||||||
disableExtensions: boolean;
|
disableExtensions: boolean;
|
||||||
|
@ -173,7 +173,7 @@ export class EnvService implements IEnvService {
|
||||||
enablePerformance: argv.performance,
|
enablePerformance: argv.performance,
|
||||||
verbose: argv.verbose,
|
verbose: argv.verbose,
|
||||||
debugPluginHost,
|
debugPluginHost,
|
||||||
debugBrkExtensionHost: !!debugBrkExtensionHostPort,
|
debugBrkPluginHost: !!debugBrkExtensionHostPort,
|
||||||
logExtensionHostCommunication: argv.logExtensionHostCommunication,
|
logExtensionHostCommunication: argv.logExtensionHostCommunication,
|
||||||
debugBrkFileWatcherPort: debugBrkFileWatcherPort,
|
debugBrkFileWatcherPort: debugBrkFileWatcherPort,
|
||||||
openNewWindow: argv['new-window'],
|
openNewWindow: argv['new-window'],
|
||||||
|
@ -188,7 +188,7 @@ export class EnvService implements IEnvService {
|
||||||
waitForWindowClose: argv.wait
|
waitForWindowClose: argv.wait
|
||||||
});
|
});
|
||||||
|
|
||||||
this._isTestingFromCli = this.cliArgs.extensionTestsPath && !this.cliArgs.debugBrkExtensionHost;
|
this._isTestingFromCli = this.cliArgs.extensionTestsPath && !this.cliArgs.debugBrkPluginHost;
|
||||||
this._userHome = path.join(os.homedir(), product.dataFolderName);
|
this._userHome = path.join(os.homedir(), product.dataFolderName);
|
||||||
this._userExtensionsHome = this.cliArgs.extensionsHomePath || path.join(this._userHome, 'extensions');
|
this._userExtensionsHome = this.cliArgs.extensionsHomePath || path.join(this._userHome, 'extensions');
|
||||||
|
|
||||||
|
|
|
@ -412,7 +412,7 @@ export class VSCodeWindow {
|
||||||
configuration.logExtensionHostCommunication = cli.logExtensionHostCommunication;
|
configuration.logExtensionHostCommunication = cli.logExtensionHostCommunication;
|
||||||
configuration.debugBrkFileWatcherPort = cli.debugBrkFileWatcherPort;
|
configuration.debugBrkFileWatcherPort = cli.debugBrkFileWatcherPort;
|
||||||
configuration.debugPluginHost = cli.debugPluginHost;
|
configuration.debugPluginHost = cli.debugPluginHost;
|
||||||
configuration.debugBrkExtensionHost = cli.debugBrkExtensionHost;
|
configuration.debugBrkPluginHost = cli.debugBrkPluginHost;
|
||||||
configuration.extensionsHomePath = cli.extensionsHomePath;
|
configuration.extensionsHomePath = cli.extensionsHomePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -926,7 +926,7 @@ export class WindowsManager implements IWindowsService {
|
||||||
configuration.verbose = currentWindowConfig.verbose;
|
configuration.verbose = currentWindowConfig.verbose;
|
||||||
configuration.logExtensionHostCommunication = currentWindowConfig.logExtensionHostCommunication;
|
configuration.logExtensionHostCommunication = currentWindowConfig.logExtensionHostCommunication;
|
||||||
configuration.debugBrkFileWatcherPort = currentWindowConfig.debugBrkFileWatcherPort;
|
configuration.debugBrkFileWatcherPort = currentWindowConfig.debugBrkFileWatcherPort;
|
||||||
configuration.debugBrkExtensionHost = currentWindowConfig.debugBrkExtensionHost;
|
configuration.debugBrkPluginHost = currentWindowConfig.debugBrkPluginHost;
|
||||||
configuration.debugPluginHost = currentWindowConfig.debugPluginHost;
|
configuration.debugPluginHost = currentWindowConfig.debugPluginHost;
|
||||||
configuration.extensionsHomePath = currentWindowConfig.extensionsHomePath;
|
configuration.extensionsHomePath = currentWindowConfig.extensionsHomePath;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,7 @@ export interface IEnvironmentService {
|
||||||
extensionDevelopmentPath: string;
|
extensionDevelopmentPath: string;
|
||||||
|
|
||||||
debugExtensionHostPort: number;
|
debugExtensionHostPort: number;
|
||||||
|
debugBrkExtensionHost: boolean;
|
||||||
|
|
||||||
isBuilt: boolean;
|
isBuilt: boolean;
|
||||||
verbose: boolean;
|
verbose: boolean;
|
||||||
|
|
|
@ -42,10 +42,14 @@ export class EnvironmentService implements IEnvironmentService {
|
||||||
private _debugExtensionHostPort: number;
|
private _debugExtensionHostPort: number;
|
||||||
get debugExtensionHostPort(): number { return this._debugExtensionHostPort; }
|
get debugExtensionHostPort(): number { return this._debugExtensionHostPort; }
|
||||||
|
|
||||||
|
private _debugBrkExtensionHost: boolean;
|
||||||
|
get debugBrkExtensionHost(): boolean { return this._debugBrkExtensionHost; }
|
||||||
|
|
||||||
get isBuilt(): boolean { return !process.env['VSCODE_DEV']; }
|
get isBuilt(): boolean { return !process.env['VSCODE_DEV']; }
|
||||||
get verbose(): boolean { return this.args.verbose; }
|
get verbose(): boolean { return this.args.verbose; }
|
||||||
|
|
||||||
get debugBrkFileWatcherPort(): number { return typeof this.args.debugBrkFileWatcherPort === 'string' ? Number(this.args.debugBrkFileWatcherPort) : void 0; }
|
private _debugBrkFileWatcherPort: number;
|
||||||
|
get debugBrkFileWatcherPort(): number { return this._debugBrkFileWatcherPort; }
|
||||||
|
|
||||||
constructor(private args: ParsedArgs) {
|
constructor(private args: ParsedArgs) {
|
||||||
this._appRoot = path.dirname(URI.parse(require.toUrl('')).fsPath);
|
this._appRoot = path.dirname(URI.parse(require.toUrl('')).fsPath);
|
||||||
|
@ -64,5 +68,9 @@ export class EnvironmentService implements IEnvironmentService {
|
||||||
if (args.debugPluginHost) {
|
if (args.debugPluginHost) {
|
||||||
this._debugExtensionHostPort = Number(args.debugPluginHost);
|
this._debugExtensionHostPort = Number(args.debugPluginHost);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this._debugBrkExtensionHost = Boolean(args.debugBrkPluginHost);
|
||||||
|
|
||||||
|
this._debugBrkFileWatcherPort = (typeof args.debugBrkFileWatcherPort === 'string') ? Number(args.debugBrkFileWatcherPort) : void 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -118,7 +118,6 @@ export interface IEnvironment {
|
||||||
appSettingsPath: string;
|
appSettingsPath: string;
|
||||||
appKeybindingsPath: string;
|
appKeybindingsPath: string;
|
||||||
|
|
||||||
debugBrkExtensionHost: boolean;
|
|
||||||
disableExtensions: boolean;
|
disableExtensions: boolean;
|
||||||
|
|
||||||
logExtensionHostCommunication: boolean;
|
logExtensionHostCommunication: boolean;
|
||||||
|
|
|
@ -114,8 +114,8 @@ class ExtensionHostProcessManager {
|
||||||
// handle extension host lifecycle a bit special when we know we are developing an extension that runs inside
|
// handle extension host lifecycle a bit special when we know we are developing an extension that runs inside
|
||||||
const config = this.contextService.getConfiguration();
|
const config = this.contextService.getConfiguration();
|
||||||
this.isExtensionDevelopmentHost = !!environmentService.extensionDevelopmentPath;
|
this.isExtensionDevelopmentHost = !!environmentService.extensionDevelopmentPath;
|
||||||
this.isExtensionDevelopmentDebugging = !!config.env.debugBrkExtensionHost;
|
this.isExtensionDevelopmentDebugging = !!environmentService.debugBrkExtensionHost;
|
||||||
this.isExtensionDevelopmentTestFromCli = this.isExtensionDevelopmentHost && !!config.env.extensionTestsPath && !config.env.debugBrkExtensionHost;
|
this.isExtensionDevelopmentTestFromCli = this.isExtensionDevelopmentHost && !!config.env.extensionTestsPath && !environmentService.debugBrkExtensionHost;
|
||||||
|
|
||||||
this.unsentMessages = [];
|
this.unsentMessages = [];
|
||||||
this.extensionHostProcessReady = false;
|
this.extensionHostProcessReady = false;
|
||||||
|
|
Loading…
Reference in a new issue