Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I view the storage of a Chrome Extension I've installed?

It seems like it should be possible to view the localStorage/chrome.storage of Chrome Extensions installed on my browser. I've played around with the Developer Tools a bit, but haven't found a way to do this. Any ideas?

like image 971
JoshJordan Avatar asked Aug 12 '12 14:08

JoshJordan


People also ask

Where are chrome extensions data stored?

When extensions are installed into Chrome they are extracted into the C:\Users\[login_name]\AppData\Local\Google\Chrome\User Data\Default\Extensions folder. Each extension will be stored in its own folder named after the ID of the extension.

Do Chrome extensions have Local Storage?

Therefore, if you're accessing localStorage from your contentscript, it will be the storage from that webpage, not the extension page storage. Now, to let your content script to read your extension storage (where you set them from your options page), you need to use extension message passing. chrome.


2 Answers

There is a very helpful extension to work with both localStorage and chrome.storage that I recently discovered, that works as a Dev Tools panel.

Storage Area Explorer

enter image description here

I did not write this, but it was suggested by the author on some other SO question.

like image 160
Xan Avatar answered Oct 08 '22 17:10

Xan


I will proceed to amalgamate the existing knowledge present in several answers, into a simple and comprehensive one. If you vote up this one, please do the same with the ones from @mwkwok and @chaohuang.

It is true that stuff saved using chrome.storage does not show up in developer tools, there you can only see stuff saved using regular localStorage API. Do this:

  1. Open your extension's background page by going to chrome://extensions/ ("Developer mode" needs to be checked to see background pages)

  2. Go to the Console tab and type this:

chrome.storage.local.get(function(result){console.log(result)})

This will spit the whole storage as a JSON object into the console.

like image 35
Clint Eastwood Avatar answered Oct 08 '22 17:10

Clint Eastwood