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

preferences->keyboard shortcuts">

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

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

Sarah Jenkins

Sarah Jenkins

Senior Technology Editor & AI Specialist

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.

Share this article
Twitter Facebook Pinterest