File tree Expand file tree Collapse file tree
vs/platform/menubar/electron-main Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -169,11 +169,12 @@ function registerDeveloperKeybindings() {
169169
170170 // Devtools & reload support
171171 const TOGGLE_DEV_TOOLS_KB = ( process . platform === 'darwin' ? 'meta-alt-73' : 'ctrl-shift-73' ) ; // mac: Cmd-Alt-I, rest: Ctrl-Shift-I
172+ const TOGGLE_DEV_TOOLS_KB_ALT = '123' ; // F12
172173 const RELOAD_KB = ( process . platform === 'darwin' ? 'meta-82' : 'ctrl-82' ) ; // mac: Cmd-R, rest: Ctrl-R
173174
174175 let listener = function ( e ) {
175176 const key = extractKey ( e ) ;
176- if ( key === TOGGLE_DEV_TOOLS_KB ) {
177+ if ( key === TOGGLE_DEV_TOOLS_KB || key === TOGGLE_DEV_TOOLS_KB_ALT ) {
177178 ipc . send ( 'vscode:toggleDevTools' ) ;
178179 } else if ( key === RELOAD_KB ) {
179180 ipc . send ( 'vscode:reloadWindow' ) ;
Original file line number Diff line number Diff line change @@ -719,8 +719,11 @@ export class Menubar {
719719 }
720720
721721 if ( activeWindow ) {
722- if ( ! activeWindow . isReady && isMacintosh && id === 'workbench.action.toggleDevTools' ) {
723- return ; // prevent this action from running twice on macOS (https://github.com/Microsoft/vscode/issues/62719)
722+ if ( ! activeWindow . isReady && isMacintosh && id === 'workbench.action.toggleDevTools' && ! this . environmentService . isBuilt ) {
723+ // prevent this action from running twice on macOS (https://github.com/Microsoft/vscode/issues/62719)
724+ // we already register a keybinding in bootstrap-window.js for opening developer tools in case something
725+ // goes wrong and that keybinding is only removed when the application has loaded (= window ready).
726+ return ;
724727 }
725728
726729 this . windowsMainService . sendToFocused ( 'vscode:runAction' , { id, from : 'menu' } as IRunActionInWindowRequest ) ;
You can’t perform that action at this time.
0 commit comments