Where is Chrome's debugger console command history stored? Where is Chrome's debugger console command history stored? google-chrome google-chrome

Where is Chrome's debugger console command history stored?


I found an answer here: How to access firefox web console command history?

I had some trouble getting it working, but here is how I did.

Open the developer console (shift-ctrl-I). Then open that console in a new window if it isn't that already by using the menu in the upper right (the three dots).

When it is a separate window, press shift-ctrl-I again. Then paste something like this:

var hist = JSON.parse(localStorage.consoleHistory);hist.forEach(function(command){  console.log(command);})

Now, with all the commands in the console you can either copy them all to the clipboard or use the filter field above the console to do some filtering on them (you can use regex).


https://code.google.com/p/chromium/issues/detail?id=171386

Seems there was talk of such a feature which never came to fruitionYou can collect some people and pressure the devs to put it in, or get it done.Sounds really useful to me (:

For retrieving history :https://developer.chrome.com/extensions/experimental_devtools_console#method-getMessages

How about developing an extension around that ?


Adding To marlars answer :

Actually i think its a little useful to not convert it into json. you can just keep it as a string so that you can use .indexof('yoursearchvalue')

And you don't have to always type that piece of code. you can just go to the Application tab -> Local Storage -> Devtools Entry and click on the consoleHistory