Skip to content

Commit dbead18

Browse files
authored
Add F10 keybinding for debugger step, even on Web. (microsoft#183510)
Fixes microsoft#181792. Previously, for Web the keyboard shortcut was Alt-F10, because it was believed that F10 could not be bound on browsers. This turned out to be incorrect, so we make the shortcut consistent (F10) with desktop VSCode which is also what many other debuggers use. We keep Alt-F10 on web as a secondary keybinding to keep the experience some web users may have gotten used to by now.
1 parent 28e1298 commit dbead18

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/vs/workbench/contrib/debug/browser/debugCommands.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,8 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
473473
KeybindingsRegistry.registerCommandAndKeybindingRule({
474474
id: STEP_OVER_ID,
475475
weight: KeybindingWeight.WorkbenchContrib,
476-
primary: isWeb ? (KeyMod.Alt | KeyCode.F10) : KeyCode.F10, // Browsers do not allow F10 to be binded so we have to bind an alternative
476+
primary: KeyCode.F10,
477+
secondary: isWeb ? [(KeyMod.Alt | KeyCode.F10)] : undefined, // Keep Alt-F10 for web for backwards-compatibility
477478
when: CONTEXT_DEBUG_STATE.isEqualTo('stopped'),
478479
handler: async (accessor: ServicesAccessor, _: string, context: CallStackContext | unknown) => {
479480
const contextKeyService = accessor.get(IContextKeyService);

0 commit comments

Comments
 (0)