diff --git a/src/vs/code/electron-main/window.ts b/src/vs/code/electron-main/window.ts index 5efb14333451093e3a89ec1c0e738a2450871a0b..daf6df757cde5a88348aca7c5c1b1c51102d829f 100644 --- a/src/vs/code/electron-main/window.ts +++ b/src/vs/code/electron-main/window.ts @@ -215,6 +215,11 @@ export class CodeWindow extends Disposable implements ICodeWindow { this._win = new BrowserWindow(options); this._id = this._win.id; + // Open devtools if instructed from command line args + if (this.environmentService.args['open-devtools'] === true) { + this._win.webContents.openDevTools(); + } + if (isMacintosh && useCustomTitleStyle) { this._win.setSheetOffset(22); // offset dialogs by the height of the custom title bar if we have any } diff --git a/src/vs/platform/environment/node/argv.ts b/src/vs/platform/environment/node/argv.ts index 38e7ca5ad332ec5f97f63b7d17be10875b23ae47..d3179e46b2f4c7d99909f26e7cf3c9be977c1512 100644 --- a/src/vs/platform/environment/node/argv.ts +++ b/src/vs/platform/environment/node/argv.ts @@ -33,6 +33,7 @@ export interface ParsedArgs { trace?: boolean; 'trace-category-filter'?: string; 'trace-options'?: string; + 'open-devtools'?: boolean; log?: string; logExtensionHostCommunication?: boolean; 'extensions-dir'?: string; @@ -193,6 +194,7 @@ export const OPTIONS: OptionDescriptions> = { 'trace-category-filter': { type: 'string' }, 'trace-options': { type: 'string' }, 'force-user-env': { type: 'boolean' }, + 'open-devtools': { type: 'boolean' }, // chromium flags 'no-proxy-server': { type: 'boolean' },