remove debugBrkFileWatcherPort
This commit is contained in:
parent
e4b316978b
commit
5f53f7c741
|
@ -55,20 +55,6 @@ export interface IEnvService {
|
||||||
createPaths(): TPromise<void>;
|
createPaths(): TPromise<void>;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getNumericValue(value: string, defaultValue: number, fallback: number = void 0) {
|
|
||||||
const numericValue = parseInt(value);
|
|
||||||
|
|
||||||
if (types.isNumber(numericValue)) {
|
|
||||||
return numericValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (value) {
|
|
||||||
return defaultValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
return fallback;
|
|
||||||
}
|
|
||||||
|
|
||||||
export class EnvService implements IEnvService {
|
export class EnvService implements IEnvService {
|
||||||
|
|
||||||
_serviceBrand: any;
|
_serviceBrand: any;
|
||||||
|
@ -143,7 +129,6 @@ export class EnvService implements IEnvService {
|
||||||
|
|
||||||
const argv = parseArgs(args);
|
const argv = parseArgs(args);
|
||||||
const paths = parsePathArguments(this._currentWorkingDirectory, argv._, argv.goto);
|
const paths = parsePathArguments(this._currentWorkingDirectory, argv._, argv.goto);
|
||||||
const debugBrkFileWatcherPort = getNumericValue(argv.debugBrkFileWatcherPort, void 0);
|
|
||||||
|
|
||||||
this._cliArgs = Object.freeze({
|
this._cliArgs = Object.freeze({
|
||||||
_: [],
|
_: [],
|
||||||
|
@ -153,7 +138,6 @@ export class EnvService implements IEnvService {
|
||||||
debugPluginHost: argv.debugPluginHost,
|
debugPluginHost: argv.debugPluginHost,
|
||||||
debugBrkPluginHost: argv.debugBrkPluginHost,
|
debugBrkPluginHost: argv.debugBrkPluginHost,
|
||||||
logExtensionHostCommunication: argv.logExtensionHostCommunication,
|
logExtensionHostCommunication: argv.logExtensionHostCommunication,
|
||||||
debugBrkFileWatcherPort: debugBrkFileWatcherPort ? String(debugBrkFileWatcherPort) : void 0,
|
|
||||||
'new-window': argv['new-window'],
|
'new-window': argv['new-window'],
|
||||||
'reuse-window': argv['reuse-window'],
|
'reuse-window': argv['reuse-window'],
|
||||||
goto: argv.goto,
|
goto: argv.goto,
|
||||||
|
|
|
@ -378,7 +378,6 @@ export class VSCodeWindow {
|
||||||
// in plugin development mode. These options are all development related.
|
// in plugin development mode. These options are all development related.
|
||||||
if (this.isPluginDevelopmentHost && cli) {
|
if (this.isPluginDevelopmentHost && cli) {
|
||||||
configuration.verbose = cli.verbose;
|
configuration.verbose = cli.verbose;
|
||||||
configuration.debugBrkFileWatcherPort = cli.debugBrkFileWatcherPort;
|
|
||||||
configuration.debugPluginHost = cli.debugPluginHost;
|
configuration.debugPluginHost = cli.debugPluginHost;
|
||||||
configuration.debugBrkPluginHost = cli.debugBrkPluginHost;
|
configuration.debugBrkPluginHost = cli.debugBrkPluginHost;
|
||||||
configuration.extensionHomePath = cli.extensionHomePath;
|
configuration.extensionHomePath = cli.extensionHomePath;
|
||||||
|
|
|
@ -906,7 +906,6 @@ export class WindowsManager implements IWindowsService {
|
||||||
if (!configuration.extensionDevelopmentPath && currentWindowConfig && !!currentWindowConfig.extensionDevelopmentPath) {
|
if (!configuration.extensionDevelopmentPath && currentWindowConfig && !!currentWindowConfig.extensionDevelopmentPath) {
|
||||||
configuration.extensionDevelopmentPath = currentWindowConfig.extensionDevelopmentPath;
|
configuration.extensionDevelopmentPath = currentWindowConfig.extensionDevelopmentPath;
|
||||||
configuration.verbose = currentWindowConfig.verbose;
|
configuration.verbose = currentWindowConfig.verbose;
|
||||||
configuration.debugBrkFileWatcherPort = currentWindowConfig.debugBrkFileWatcherPort;
|
|
||||||
configuration.debugBrkPluginHost = currentWindowConfig.debugBrkPluginHost;
|
configuration.debugBrkPluginHost = currentWindowConfig.debugBrkPluginHost;
|
||||||
configuration.debugPluginHost = currentWindowConfig.debugPluginHost;
|
configuration.debugPluginHost = currentWindowConfig.debugPluginHost;
|
||||||
configuration.extensionHomePath = currentWindowConfig.extensionHomePath;
|
configuration.extensionHomePath = currentWindowConfig.extensionHomePath;
|
||||||
|
|
|
@ -20,7 +20,6 @@ export interface ParsedArgs extends minimist.ParsedArgs {
|
||||||
performance?: boolean;
|
performance?: boolean;
|
||||||
verbose?: boolean;
|
verbose?: boolean;
|
||||||
logExtensionHostCommunication?: boolean;
|
logExtensionHostCommunication?: boolean;
|
||||||
debugBrkFileWatcherPort?: string;
|
|
||||||
'disable-extensions'?: boolean;
|
'disable-extensions'?: boolean;
|
||||||
extensionHomePath?: string;
|
extensionHomePath?: string;
|
||||||
extensionDevelopmentPath?: string;
|
extensionDevelopmentPath?: string;
|
||||||
|
|
|
@ -33,6 +33,4 @@ export interface IEnvironmentService {
|
||||||
isBuilt: boolean;
|
isBuilt: boolean;
|
||||||
verbose: boolean;
|
verbose: boolean;
|
||||||
performance: boolean;
|
performance: boolean;
|
||||||
|
|
||||||
debugBrkFileWatcherPort: number;
|
|
||||||
}
|
}
|
|
@ -61,9 +61,6 @@ export class EnvironmentService implements IEnvironmentService {
|
||||||
get performance(): boolean { return this.args.performance; }
|
get performance(): boolean { return this.args.performance; }
|
||||||
get logExtensionHostCommunication(): boolean { return this.args.logExtensionHostCommunication; }
|
get logExtensionHostCommunication(): boolean { return this.args.logExtensionHostCommunication; }
|
||||||
|
|
||||||
private _debugBrkFileWatcherPort: number;
|
|
||||||
get debugBrkFileWatcherPort(): number { return this._debugBrkFileWatcherPort; }
|
|
||||||
|
|
||||||
constructor(private args: IEnvironment) {
|
constructor(private args: IEnvironment) {
|
||||||
this._appRoot = path.dirname(URI.parse(require.toUrl('')).fsPath);
|
this._appRoot = path.dirname(URI.parse(require.toUrl('')).fsPath);
|
||||||
this._userDataPath = args['user-data-dir'] || paths.getDefaultUserDataPath(process.platform);
|
this._userDataPath = args['user-data-dir'] || paths.getDefaultUserDataPath(process.platform);
|
||||||
|
@ -81,8 +78,6 @@ export class EnvironmentService implements IEnvironmentService {
|
||||||
const { port, brk } = parseExtensionHostPort(args, this.isBuilt);
|
const { port, brk } = parseExtensionHostPort(args, this.isBuilt);
|
||||||
this._debugExtensionHostPort = port;
|
this._debugExtensionHostPort = port;
|
||||||
this._debugBrkExtensionHost = brk;
|
this._debugBrkExtensionHost = brk;
|
||||||
|
|
||||||
this._debugBrkFileWatcherPort = (typeof args.debugBrkFileWatcherPort === 'string') ? Number(args.debugBrkFileWatcherPort) : void 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,13 +63,8 @@ export class FileService implements IFileService {
|
||||||
encodingOverride: encodingOverride,
|
encodingOverride: encodingOverride,
|
||||||
watcherIgnoredPatterns: watcherIgnoredPatterns,
|
watcherIgnoredPatterns: watcherIgnoredPatterns,
|
||||||
verboseLogging: environmentService.verbose,
|
verboseLogging: environmentService.verbose,
|
||||||
debugBrkFileWatcherPort: environmentService.debugBrkFileWatcherPort
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (typeof environmentService.debugBrkFileWatcherPort === 'number') {
|
|
||||||
console.warn(`File Watcher STOPPED on first line for debugging on port ${environmentService.debugBrkFileWatcherPort}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
// create service
|
// create service
|
||||||
let workspace = this.contextService.getWorkspace();
|
let workspace = this.contextService.getWorkspace();
|
||||||
this.raw = new NodeFileService(workspace ? workspace.resource.fsPath : void 0, fileServiceConfig, this.eventService);
|
this.raw = new NodeFileService(workspace ? workspace.resource.fsPath : void 0, fileServiceConfig, this.eventService);
|
||||||
|
|
|
@ -47,7 +47,6 @@ export interface IFileServiceOptions {
|
||||||
watcherIgnoredPatterns?: string[];
|
watcherIgnoredPatterns?: string[];
|
||||||
disableWatcher?: boolean;
|
disableWatcher?: boolean;
|
||||||
verboseLogging?: boolean;
|
verboseLogging?: boolean;
|
||||||
debugBrkFileWatcherPort?: number;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function etag(stat: fs.Stats): string;
|
function etag(stat: fs.Stats): string;
|
||||||
|
@ -129,7 +128,7 @@ export class FileService implements IFileService {
|
||||||
}
|
}
|
||||||
|
|
||||||
private setupUnixWorkspaceWatching(): void {
|
private setupUnixWorkspaceWatching(): void {
|
||||||
this.workspaceWatcherToDispose = new UnixWatcherService(this.basePath, this.options.watcherIgnoredPatterns, this.eventEmitter, this.options.errorLogger, this.options.verboseLogging, this.options.debugBrkFileWatcherPort).startWatching();
|
this.workspaceWatcherToDispose = new UnixWatcherService(this.basePath, this.options.watcherIgnoredPatterns, this.eventEmitter, this.options.errorLogger, this.options.verboseLogging).startWatching();
|
||||||
}
|
}
|
||||||
|
|
||||||
public resolveFile(resource: uri, options?: IResolveFileOptions): TPromise<IFileStat> {
|
public resolveFile(resource: uri, options?: IResolveFileOptions): TPromise<IFileStat> {
|
||||||
|
|
|
@ -25,8 +25,7 @@ export class FileWatcher {
|
||||||
private ignored: string[],
|
private ignored: string[],
|
||||||
private eventEmitter: IEventService,
|
private eventEmitter: IEventService,
|
||||||
private errorLogger: (msg: string) => void,
|
private errorLogger: (msg: string) => void,
|
||||||
private verboseLogging: boolean,
|
private verboseLogging: boolean
|
||||||
private debugBrkFileWatcherPort: number
|
|
||||||
) {
|
) {
|
||||||
this.isDisposed = false;
|
this.isDisposed = false;
|
||||||
this.restartCounter = 0;
|
this.restartCounter = 0;
|
||||||
|
@ -34,9 +33,6 @@ export class FileWatcher {
|
||||||
|
|
||||||
public startWatching(): () => void {
|
public startWatching(): () => void {
|
||||||
const args = ['--type=watcherService'];
|
const args = ['--type=watcherService'];
|
||||||
if (typeof this.debugBrkFileWatcherPort === 'number') {
|
|
||||||
args.push(`--debug-brk=${this.debugBrkFileWatcherPort}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
const client = new Client(
|
const client = new Client(
|
||||||
uri.parse(require.toUrl('bootstrap')).fsPath,
|
uri.parse(require.toUrl('bootstrap')).fsPath,
|
||||||
|
|
Loading…
Reference in a new issue