75

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
  • 146,994
  • 96
  • 417
  • 335
  • 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

139

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

Elijah Lynn
  • 12,272
  • 10
  • 61
  • 91
Nicola Coretti
  • 2,655
  • 2
  • 20
  • 22
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,265
  • 4
  • 20
  • 29
James An
  • 1,383
  • 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,762
  • 6
  • 42
  • 41
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
  • 6,053
  • 5
  • 37
  • 58
1

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

0

It is Ctrl + Shift + L for Firefox console.

Nikhil Girraj
  • 1,135
  • 1
  • 15
  • 33