diff --git a/src/vs/code/node/argv.ts b/src/vs/code/node/argv.ts
index 85beec2aa4d..0f213db11c8 100644
--- a/src/vs/code/node/argv.ts
+++ b/src/vs/code/node/argv.ts
@@ -94,6 +94,7 @@ ${ indent }-r, --reuse-window Force opening a file or folder in the last acti
${ indent } window.
${ indent }--user-data-dir
Specifies the directory that user data is kept in,
${ indent } useful when running as root.
+${ indent }--verbose Print verbose output (implies --wait).
${ indent }-v, --version Print version.
${ indent }-w, --wait Wait for the window to be closed before returning.
${ indent }--list-extensions List the installed extensions.
diff --git a/src/vs/code/node/cli.ts b/src/vs/code/node/cli.ts
index 85a09102b76..9f1dad5878a 100644
--- a/src/vs/code/node/cli.ts
+++ b/src/vs/code/node/cli.ts
@@ -35,14 +35,23 @@ export function main(args: string[]): TPromise {
});
delete env['ATOM_SHELL_INTERNAL_RUN_AS_NODE'];
- const child = spawn(process.execPath, args, {
- detached: true,
- stdio: 'ignore',
- env
- });
+ let options = {
+ detacted: true,
+ env,
+ };
+ if (!argv.verbose) {
+ options['stdio'] = 'ignore';
+ }
- if (argv.wait) {
- return new TPromise(c => child.once('exit', ()=> c(null)));
+ const child = spawn(process.execPath, args, options);
+
+ if (argv.verbose) {
+ child.stdout.on('data', (data) => console.log(data.toString('utf8').trim()));
+ child.stderr.on('data', (data) => console.log(data.toString('utf8').trim()));
+ }
+
+ if (argv.wait || argv.verbose) {
+ return new TPromise(c => child.once('exit', () => c(null)));
}
}