5

I want to add a keyboard shortcut for the command 'Debug: evaluate' in Visual Studio Code. Unfortunately, the command ID for the command 'Debug: evaluate' is not documented. Did someone know where to find the commandId ?

poulo
  • 55
  • 5
  • Does this answer your question? [Is there a shortcut in VSCode to execute current line or selection in debug REPL?](https://stackoverflow.com/questions/59768704/is-there-a-shortcut-in-vscode-to-execute-current-line-or-selection-in-debug-repl) (that one is newer, but question seems to be worded in a way that is more searchable (demonstrated by more views and higher scores of question and answers)) – starball Aug 31 '23 at 18:29

1 Answers1

9

editor.debug.action.selectionToRepl is what you are looking for. It will execute the current selected text in the debugger console.

https://github.com/Microsoft/vscode/blob/d2b6bbb46fbdf535e2c96b3e00ac56ac1d427a69/src/vs/workbench/parts/debug/browser/debugEditorActions.ts#L141

Steffen
  • 3,327
  • 2
  • 26
  • 30