提交 5874111e 编写于 作者: B Benjamin Pasero

--verbose tweaks

上级 6e7aa1bf
...@@ -56,7 +56,7 @@ export class LaunchService implements ILaunchService { ...@@ -56,7 +56,7 @@ export class LaunchService implements ILaunchService {
) {} ) {}
start(args: ICommandLineArguments, userEnv: IProcessEnvironment): TPromise<void> { start(args: ICommandLineArguments, userEnv: IProcessEnvironment): TPromise<void> {
this.logService.log('Received data from other instance', args, userEnv); this.logService.log('Received data from other instance: ', args, userEnv);
// Otherwise handle in windows service // Otherwise handle in windows service
let usedWindows: VSCodeWindow[]; let usedWindows: VSCodeWindow[];
......
...@@ -26,7 +26,7 @@ export class MainLogService implements ILogService { ...@@ -26,7 +26,7 @@ export class MainLogService implements ILogService {
const { verbose } = this.envService.cliArgs; const { verbose } = this.envService.cliArgs;
if (verbose) { if (verbose) {
console.log(`(${new Date().toLocaleTimeString()})`, ...args); console.log(`\x1b[93m[main ${new Date().toLocaleTimeString()}]\x1b[0m`, ...args);
} }
} }
} }
\ No newline at end of file
...@@ -99,8 +99,9 @@ function main(accessor: ServicesAccessor, mainIpcServer: Server, userEnv: IProce ...@@ -99,8 +99,9 @@ function main(accessor: ServicesAccessor, mainIpcServer: Server, userEnv: IProce
} }
}); });
logService.log('### VSCode main.js ###'); logService.log('Starting VS Code in verbose mode');
logService.log(envService.appRoot, envService.cliArgs); logService.log(`from: ${envService.appRoot}`);
logService.log('args:', envService.cliArgs);
// Setup Windows mutex // Setup Windows mutex
let windowsMutex: Mutex = null; let windowsMutex: Mutex = null;
......
...@@ -41,12 +41,18 @@ export function main(argv: string[]): TPromise<void> { ...@@ -41,12 +41,18 @@ export function main(argv: string[]): TPromise<void> {
'VSCODE_CLI': '1', 'VSCODE_CLI': '1',
'ELECTRON_NO_ATTACH_CONSOLE': '1' 'ELECTRON_NO_ATTACH_CONSOLE': '1'
}); });
delete env['ELECTRON_RUN_AS_NODE']; delete env['ELECTRON_RUN_AS_NODE'];
let options = { if (args.verbose) {
env['ELECTRON_ENABLE_LOGGING'] = '1';
}
const options = {
detached: true, detached: true,
env, env,
}; };
if (!args.verbose) { if (!args.verbose) {
options['stdio'] = 'ignore'; options['stdio'] = 'ignore';
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册