How to remove all recent console command

前端 未结 10 1094
青春惊慌失措
青春惊慌失措 2020-11-27 13:00

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 thi

相关标签:
10条回答
  • 2020-11-27 13:28

    I found a quick way to do this with cool keyboard shortcut:

    Inside chrome console

    1. Press Ctrl + Shift + P
    2. You will see this awesome command palette opened: chrome devtools command palette
    3. type clear and you will find it :) chrome devtools: clear console history

    That's it!

    0 讨论(0)
  • 2020-11-27 13:28

    Simply enter clear() in the chrome console to remove all previous text there.

    0 讨论(0)
  • 2020-11-27 13:31

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

    0 讨论(0)
  • 2020-11-27 13:35

    Press f5 key. When you refresh the current webpage where you've been working on, the command history will be removed.

    0 讨论(0)
  • 2020-11-27 13:37

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

    0 讨论(0)
  • 2020-11-27 13:43

    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.

    0 讨论(0)
提交回复
热议问题