remove debugBrkFileWatcherPort
This commit is contained in:
parent
e4b316978b
commit
5f53f7c741
|
@ -55,20 +55,6 @@ export interface IEnvService {
|
|||
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 {
|
||||
|
||||
_serviceBrand: any;
|
||||
|
@ -143,7 +129,6 @@ export class EnvService implements IEnvService {
|
|||
|
||||
const argv = parseArgs(args);
|
||||
const paths = parsePathArguments(this._currentWorkingDirectory, argv._, argv.goto);
|
||||
const debugBrkFileWatcherPort = getNumericValue(argv.debugBrkFileWatcherPort, void 0);
|
||||
|
||||
this._cliArgs = Object.freeze({
|
||||
_: [],
|
||||
|
@ -153,7 +138,6 @@ export class EnvService implements IEnvService {
|
|||
debugPluginHost: argv.debugPluginHost,
|
||||
debugBrkPluginHost: argv.debugBrkPluginHost,
|
||||
logExtensionHostCommunication: argv.logExtensionHostCommunication,
|
||||
debugBrkFileWatcherPort: debugBrkFileWatcherPort ? String(debugBrkFileWatcherPort) : void 0,
|
||||
'new-window': argv['new-window'],
|
||||
'reuse-window': argv['reuse-window'],
|
||||
goto: argv.goto,
|
||||
|
|
|
@ -378,7 +378,6 @@ export class VSCodeWindow {
|
|||
// in plugin development mode. These options are all development related.
|
||||
if (this.isPluginDevelopmentHost && cli) {
|
||||
configuration.verbose = cli.verbose;
|
||||
configuration.debugBrkFileWatcherPort = cli.debugBrkFileWatcherPort;
|
||||
configuration.debugPluginHost = cli.debugPluginHost;
|
||||
configuration.debugBrkPluginHost = cli.debugBrkPluginHost;
|
||||
configuration.extensionHomePath = cli.extensionHomePath;
|
||||
|
|
|
@ -906,7 +906,6 @@ export class WindowsManager implements IWindowsService {
|
|||
if (!configuration.extensionDevelopmentPath && currentWindowConfig && !!currentWindowConfig.extensionDevelopmentPath) {
|
||||
configuration.extensionDevelopmentPath = currentWindowConfig.extensionDevelopmentPath;
|
||||
configuration.verbose = currentWindowConfig.verbose;
|
||||
configuration.debugBrkFileWatcherPort = currentWindowConfig.debugBrkFileWatcherPort;
|
||||
configuration.debugBrkPluginHost = currentWindowConfig.debugBrkPluginHost;
|
||||
configuration.debugPluginHost = currentWindowConfig.debugPluginHost;
|
||||
configuration.extensionHomePath = currentWindowConfig.extensionHomePath;
|
||||
|
|
|
@ -20,7 +20,6 @@ export interface ParsedArgs extends minimist.ParsedArgs {
|
|||
performance?: boolean;
|
||||
verbose?: boolean;
|
||||
logExtensionHostCommunication?: boolean;
|
||||
debugBrkFileWatcherPort?: string;
|
||||
'disable-extensions'?: boolean;
|
||||
extensionHomePath?: string;
|
||||
extensionDevelopmentPath?: string;
|
||||
|
|
|
@ -33,6 +33,4 @@ export interface IEnvironmentService {
|
|||
isBuilt: boolean;
|
||||
verbose: boolean;
|
||||
performance: boolean;
|
||||
|
||||
debugBrkFileWatcherPort: number;
|
||||
}
|
|
@ -61,9 +61,6 @@ export class EnvironmentService implements IEnvironmentService {
|
|||
get performance(): boolean { return this.args.performance; }
|
||||
get logExtensionHostCommunication(): boolean { return this.args.logExtensionHostCommunication; }
|
||||
|
||||
private _debugBrkFileWatcherPort: number;
|
||||
get debugBrkFileWatcherPort(): number { return this._debugBrkFileWatcherPort; }
|
||||
|
||||
constructor(private args: IEnvironment) {
|
||||
this._appRoot = path.dirname(URI.parse(require.toUrl('')).fsPath);
|
||||
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);
|
||||
this._debugExtensionHostPort = port;
|
||||
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,
|
||||
watcherIgnoredPatterns: watcherIgnoredPatterns,
|
||||
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
|
||||
let workspace = this.contextService.getWorkspace();
|
||||
this.raw = new NodeFileService(workspace ? workspace.resource.fsPath : void 0, fileServiceConfig, this.eventService);
|
||||
|
|
|
@ -47,7 +47,6 @@ export interface IFileServiceOptions {
|
|||
watcherIgnoredPatterns?: string[];
|
||||
disableWatcher?: boolean;
|
||||
verboseLogging?: boolean;
|
||||
debugBrkFileWatcherPort?: number;
|
||||
}
|
||||
|
||||
function etag(stat: fs.Stats): string;
|
||||
|
@ -129,7 +128,7 @@ export class FileService implements IFileService {
|
|||
}
|
||||
|
||||
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> {
|
||||
|
|
|
@ -25,8 +25,7 @@ export class FileWatcher {
|
|||
private ignored: string[],
|
||||
private eventEmitter: IEventService,
|
||||
private errorLogger: (msg: string) => void,
|
||||
private verboseLogging: boolean,
|
||||
private debugBrkFileWatcherPort: number
|
||||
private verboseLogging: boolean
|
||||
) {
|
||||
this.isDisposed = false;
|
||||
this.restartCounter = 0;
|
||||
|
@ -34,9 +33,6 @@ export class FileWatcher {
|
|||
|
||||
public startWatching(): () => void {
|
||||
const args = ['--type=watcherService'];
|
||||
if (typeof this.debugBrkFileWatcherPort === 'number') {
|
||||
args.push(`--debug-brk=${this.debugBrkFileWatcherPort}`);
|
||||
}
|
||||
|
||||
const client = new Client(
|
||||
uri.parse(require.toUrl('bootstrap')).fsPath,
|
||||
|
|
Loading…
Reference in a new issue