Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove all recent console command

to using commands that were previously submitted by bringing focus to the console and pressing up/down key on it. I want to remove all of the recent command. I've tried this command :

console.clear();  

but it's still not working properly. I even clean the whole cookies and cache in the browser. but these commands still there on the console. does anyone know how?

like image 751
Herry Kusmadi Avatar asked Jan 15 '14 22:01

Herry Kusmadi


People also ask

How do I clear my console history?

Use the short cut Ctrl + L to clear the console. Use the clear log button on the top left corner of the chrome dev tools console to clear the console.

How do I get rid of console commands?

Re: How do I get rid of the "Console" Command Menu on PC. Just press the ~ key. Pretty much the universal console key.

How do I refresh the chrome console?

Whenever you are working chrome, try this: Press F12 and open the developer tools. On the refresh button, on the top left of the browser window, do a right click.


2 Answers

You can now just right click on the console area and select "Clear console history".

enter image description here

like image 75
Jeff Lamb Avatar answered Sep 22 '22 11:09

Jeff Lamb


If you want to clear the list of last typed commands, follow these steps:

(Step 1 and 2 are important, don't skip them!)

  1. Undock the console (click on the icon in the bottom-left corner, undock icon).
    (if you don't see the undock icon, but , then hold the mouse pressed for a few seconds to get the desired icon)
  2. Press Ctrl + Shift + J to open the console for this console. (On OSX use Cmd + Option + i)
  3. Go to the Resources tab, "Local Storage", chrome-devtools://devtools.
  4. Right-click on the item with key "consoleHistory", and choose "Delete". chrome-devtools://devtools -> consoleHistory -> Delete

  5. 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.

like image 21
Rob W Avatar answered Sep 22 '22 11:09

Rob W