VS Code: what is the keyboard short cut to clear debug console

I am not able to find in the documentation about how to clear debug console by using the keyboard shortcut.

Is there a way to do so?

7 Answers

There is no default shortcut provided, however, you can create your own shortcut:

{ "key": "ctrl+k", "command": "workbench.debug.panel.action.clearReplAction", "when": "inDebugRepl" } 
5

file->preferences->keyboard shortcuts

search "clear console" or "clear Output"(if) then press enter .Just Add your keyboard Combination,like Win key or other key

file->preferences->keyboard shortcuts. Search "clear console" or "clear Output"(if) then press enter .Just Add your keyboard Combination,like Win key or other key

Just using the clear console icon that is at top and right of the console window.

0

Open keybindings.json (you can also just hit cmd+shift+p and then type Open Keyboard Shortcuts) and add this:

{ "key": "cmd+k", "command": "workbench.action.terminal.clear", "when": "terminalFocus" } 

Click on that button (top and right of the console window) highlighted in the red color.

No need to configure settings. ctrl + k is the shortcut.

1
    In my case I define the "workbench.action.terminal.clear" to Ctrl + K shortcut in the Keyboard Shortcuts Setting.
    And I use for the first time the Ctrl + K shortcut then I use only the Ctrl + L shortcut.
    Because when I use only Ctrl + K changing the console height causes the return of the console content.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like