6

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?

Kumar
  • 105
  • 2
  • 14
  • 1
    Possible duplicate of [How do I view the storage of a Chrome Extension I've installed?](http://stackoverflow.com/questions/11922964/how-do-i-view-the-storage-of-a-chrome-extension-ive-installed) – Haibara Ai May 16 '16 at 10:45
  • Thanks @HaibaraAi ! This worked but is there any way to access it directly without any need of extension? Edit: This answer is good http://stackoverflow.com/a/27432365/4984269 . Thanks – Kumar May 16 '16 at 10:56
  • yes, just remember to switch to the context of your extension, it will ensure `chrome.storage` is defined. – Haibara Ai May 16 '16 at 11:01
  • @HaibaraAi can you post this ans http://stackoverflow.com/a/27432365/4984269 on this question? I'll mark that question as answer, that'll give you some points – Kumar May 16 '16 at 11:02

1 Answers1

0

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?

Community
  • 1
  • 1
Haibara Ai
  • 10,703
  • 2
  • 31
  • 47