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

后端 未结 6 588
心在旅途
心在旅途 2021-01-30 10:12

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

6条回答
  •  臣服心动
    2021-01-30 10:34

    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.

提交回复
热议问题