Chrome DevTools has a handy inspector for Local Storage and Session Storage, but is there nothing to inspect chrome.storage.sync?
chrome://sync-internals/
doesn't seem to display the actual contents of the synchronized storage per extension.
Storage Area Explorer extension provides a UI for viewing, editing, clearing, importing and exporting of chrome.storage.local
, chrome.storage.sync
, localStorage
and sessionStorage
:
A poor workaround is to call get
and obtain all the stored values. Of course, this doesn't let you conveniently edit them:
chrome.storage.sync.get(null, function callback(items) { console.log(items) });
来源:https://stackoverflow.com/questions/32435399/inspect-chrome-storage-sync-while-debugging-chrome-extension