how do I clear google chrome console suggessions

浪子不回头ぞ 提交于 2019-12-09 09:35:35

问题


I want to clear the console suggestion because I entered some data in it and dont want it to been seen by others. Just want to know if there is way or do I just go to %appdata% and clear off things.


回答1:


[EDIT] As of Chrome 50, you can use "Clear console history" from the console context menu.


The situation seems to be a bit unlikely to happen (confident information in the devtools console?), but I've found the problem of clearing command history interesting. Especially, when it turned out that nothing from the 'Settings'->'Clear browsing data...' clears it. Closing the tab or restarting the browser doesn't help either.

First, I've opened DevTools (A) in a separate window:

Then, knowing that DevTools are in fact a webapp, I've opened another DevTools window (B) inside already opened one (A) using keyboard shortcut. Next, I've navigated to the "Resoures" tab, and in the "Local storage" section found a consoleHistory entry.

After removing it (right-click and "Delete") and closing both DevTools windows (A and B) I found my console history empty.




回答2:


I actually ran into this issue (needing to clear consoleHistory) when I maxed out its capacity. In this case clicking on chrome-devtools://de... in inspector would crash the window and trying to delete via localStorage.clear() or localStorage.removeItem() would timeout or be otherwise unsuccessful.

At the end of it -- my fix was deleting the localStorage data files themselves. On a mac, the instructions are:

cd ~/Library/Application Support/Google/Chrome/Default/Local Storage
rm chrome-devtools_devtools_0.localstorage
rm chrome-devtools_devtools_0.localstorage-journal

A quick google search suggests on Windows it's %LocalAppData%\Google\Chrome\User Data\Default\Local Storage, but you may need to double check.




回答3:


You can try this and see if it helps. Open the console keyboard shortcuts and just right click anywhere bellow current typing line and select "clear console history". ( Screenshot )



来源:https://stackoverflow.com/questions/18885409/how-do-i-clear-google-chrome-console-suggessions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!