2

I have a problem seeing content of the local storage for chrome-extension in DevTools (it works for regular websites, only problem is for the chrome-extension). I have tried to check Resources > Local Storage for regular page, but also for the popup and background inspection pages of my chrome-extension.

If i open console and execute:

chrome.storage.local.get('config', function(result) {console.log(JSON.stringify(result));});

I get

{"config":{"version":"0.4.1"}}

But not visible under Resources > Local Storage

I can also set

chrome.storage.local.set({"config":{"version":"0.5"}});

And re-read the new value: 0.5.

NOTE: In the Resources > Local Storage I do see the entry for my extension: chrome-extension:ld... , but i do not see any key/value there.

Any idea why this is happening, and how i can see values under under the Resources > Local Storage.

I am not aware of any way to enable access to it in manifest.json, or similar.

mPrinC
  • 9,147
  • 2
  • 32
  • 31

1 Answers1

1

Any data stored in chrome.storage.* API will not appear in resources panel as these APIs are different from localStorage and not just a wrapper around it.

This API has been optimized to meet the specific storage needs of extensions. It provides the same storage capabilities as the localStorage API with the following key differences:

... ...

It's asynchronous with bulk read and write operations, and therefore faster than the blocking and serial localStorage API.

User data can be stored as objects (the localStorage API stores data in strings).

...

Moin
  • 1,087
  • 1
  • 9
  • 19
  • 1
    Yes, I am aware of that, but it IS the most likely based on the SAME storage with an additional wrapper for object serialization (and vice versa) and asynchronous support, which you can see from the same page you have referred: https://developer.chrome.com/extensions/storage '... JSON stringification of every value plus every key's length ... '. And anyway, I am quite sure there must be a way to access the content in the Chrome DevTools. – mPrinC Dec 18 '15 at 21:52
  • Is there a solution to this in 2020? I want to view, edit and clear my local storage of chrome extension!! – insanely_sin Nov 04 '20 at 22:45