73

I want to clear the Console tab in Chrome developer tools inside the Chrome browser. I know that their is an button for that but what's the shortcut keys for doing that?

Are their anywhere cheatsheet for chrome developer tool or chrome shortcuts?

Eric Leschinski
  • 135,913
  • 89
  • 401
  • 325
  • Related posts - [clear javascript console in Google Chrome](https://stackoverflow.com/q/3011600/465053) & [How to remove all recent console command](https://stackoverflow.com/q/21149156/465053) – RBT Jun 21 '19 at 02:16

6 Answers6

137

You can use Ctrl + L to clear the chrome-dev-console on Windows/Linux and Cmd + K on Mac.

Elijah Lynn
  • 11,153
  • 10
  • 55
  • 80
Nicola Coretti
  • 2,605
  • 2
  • 19
  • 21
13

The list of keyboard shortcuts for Chrome Developer Tools is at: http://code.google.com/chrome/devtools/docs/shortcuts.html.

For clearing the console log, press Ctrl-L. Unfortunately, it appears the log needs to be in focus (clicked on) for the keyboard command to work.

NIMISHAN
  • 1,267
  • 3
  • 19
  • 29
James An
  • 1,373
  • 1
  • 10
  • 16
  • 1
    The keyboard shortcut to focus on the console is Ctrl + ` (i.e. with ). see https://developers.google.com/web/tools/chrome-devtools/shortcuts. – ksridhar Jul 13 '19 at 08:00
  • This one does not work for me, It increases the panels percentage size – Lokomotywa Sep 04 '19 at 07:27
9

Keyboard shortcuts

Ctrl + L or Cmd + L 

Command line

clear()

Here's a cheatsheet for more shortcut keys: http://anti-code.com/devtools-cheatsheet/

jaredwilli
  • 11,144
  • 5
  • 40
  • 40
5

I do not know why, but on my Mac (OS X El Capitan v10, Google Chrome v40) shortcuts mentioned above Cmd+L do NOT clear the Console log.

But Cmd + k perfectly works !!! Before using this shortcut make sure that the console is active!

So my solution for Macs is: Cmd + k !!!

Renat Gatin
  • 5,402
  • 4
  • 34
  • 55
0

It is Ctrl + Shift + L for Firefox console.

Nikhil Girraj
  • 1,126
  • 1
  • 15
  • 31
0

I found a different shortcut by accident. Maybe it is doing something else. Press Spacebar to clear the console in chrome devtools. It works too. ;)

NB: I am using ubuntu 18.04.5 LTS