提交 73d89afb 编写于 作者: B Benjamin Pasero

diag - add a cli arg to open devtools when window opens

上级 fffa94d8
......@@ -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
}
......
......@@ -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<Required<ParsedArgs>> = {
'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' },
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册