Reputation: 1361
It's possible to browse the commands previously run in the console by pressing the up and down arrow keys. I want to clear this history. How can I do this?
Upvotes: 110
Views: 76208
Reputation: 1793
You can do that now easily with
cmd + shift + p
Upvotes: 2
Reputation: 938
This is very simple, just right click the console window and select Clear console history
, then refresh the page.
Please note, refreshing/reloading that tab is required.
Upvotes: 14
Reputation: 3214
I ended up here looking for how to do the same thing in Firefox.
In case anyone else does the same, there is a clearHistory
command in the Firefox console which will do just that.
Upvotes: 4
Reputation: 2802
I found a quick way to do this with cool keyboard shortcut:
Inside chrome console
clear
and you will find it :)
That's it!
Upvotes: 74
Reputation: 5865
You can now just right click on the console area and select "Clear console history".
Upvotes: 247
Reputation: 3399
If you don't want to have this console history (like myself), simply disable it from the devtool's configuration options (see on the image) below ...
Upvotes: 11
Reputation: 1699
It can also be fixed by going to the developer tool settings and resetting to defaults.. (this will not reset 'Chrome', only developer tools options)
This way you will lose your developer settings, but for me the only thing that mattered was turning cache off again..
Upvotes: 0
Reputation: 349262
If you want to clear the list of last typed commands, follow these steps:
(Step 1 and 2 are important, don't skip them!)
chrome-devtools://devtools
.Right-click on the item with key "consoleHistory", and choose "Delete".
Done! You may close the new console, and then dock the previous one if wanted. The console history will be gone when you reload the console.
If you just want to clear the console log (not the commands), just press Ctrl + L.
You could also use Incognito mode if you don't want to keep the list of commands you're going to type.
Upvotes: 137
Reputation: 4216
Simply enter clear()
in the chrome console to remove all previous text there.
Upvotes: 3