google-chromegoogle-chrome-extension

Can't view chrome extension local storage from developers tool but can access it from extension api


As title says I can access extension local storage through api but can't see any keys and values through developer tools. Below is the code which I use to store and get keys in local storage.

Storing value

chrome.storage.sync.set({ 'handle': any-variable-which-have-some-value });

Accessing value

chrome.storage.sync.get('handle', function (savedHandle) { console.log(savedHandle.handle); });

So how can I see stored values from developer tools?


Solution

  • Open F12 tool and switch to the context of your extension, then type your code in console, you will get the storage.

    Updated:

    The following answer just provides some alternatives, check it out. How do I view the storage of a Chrome Extension I've installed?