How to remove all recent console command
You can now just right click on the console area and select "Clear console history".
If you want to clear the list of last typed commands, follow these steps:
(Step 1 and 2 are important, don't skip them!)
- Undock the console (click on the icon in the bottom-left corner, ).
(if you don't see , but , then hold the mouse pressed for a few seconds to get the desired icon) - Press Ctrl + Shift + J to open the console for this console. (On OSX use Cmd + Option + i)
- Go to the Resources tab, "Local Storage",
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.
I found a quick way to do this with cool keyboard shortcut:
Inside chrome console
- Press Ctrl + Shift + P
- You will see this awesome command palette opened:
- type
clear
and you will find it :)
That's it!
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 ...
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.