如何删除所有最近的控制台命令 [英] How to remove all recent console command

查看:265
本文介绍了如何删除所有最近的控制台命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用以前提交的命令,方法是将焦点置于控制台并按下向上/向下键。我想删除所有最近的命令。我试过这个命令:

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(); 

但它仍然无法正常工作。我甚至在浏览器中清理整个cookie和缓存。但这些命令仍在控制台上。有谁知道怎么做?

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?

推荐答案

如果要清除最后输入的命令列表,请按以下步骤操作:

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

步骤1和2很重要,不要跳过它们!


  1. 取消控制台(点击左下角的图标,)。

    (如果您没有看到,但,然后按住鼠标几秒钟以获得所需的图标)

  2. 按< kbd> Ctrl + Shift + J 打开此控制台的控制台。 (在OSX上使用 Cmd + 选项 + i

  3. 转到资源选项卡,本地存储, chrome-devtools:// devtools

  4. 右键单击带有consoleHistory键的项目,然后选择删除。

  1. 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)
  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".

完成!您可以关闭新控制台,然后根据需要停靠前一个控制台。重新加载控制台时,控制台历史记录将消失。

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.

如果您只想清除控制台日志(不是命令),只需按 Ctrl + L

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.

这篇关于如何删除所有最近的控制台命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆