Viewing info stored by chrome.storage.sync.set

10,003 views
Skip to first unread message

Andrew Luly

unread,
Nov 20, 2013, 7:26:04 PM11/20/13
to chromium-...@chromium.org
I know if i use chrome.storage.local.set I can go to the BG page in chrome://extensions and view the localstorage there... However is there any way to do this with the chrome.storage.sync?

Thanks!

David Mohl

unread,
Nov 20, 2013, 7:53:58 PM11/20/13
to chromium-...@chromium.org, Andrew Luly
Hey,

AFAIK there is no storage viewer for chrome.storage. You could easily read all the content by passing in null though. Like this:

chrome.storage.sync.get(null, function (data) { console.info(data) });

Just copy it into your background page’s console and you should see all the content.

I am usually using a custom class for writing / setting storage, with a dev option to mirror all changes into localStorage. But that’s just my preference.


On 21 Nov 2013 at 09:26:24, Andrew Luly (andre...@gmail.com) wrote:

I know if i use chrome.storage.local.set I can go to the BG page in chrome://extensions and view the localstorage there... However is there any way to do this with the chrome.storage.sync?

Thanks!
--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/be2d61d9-f40b-46b7-b96b-8167fc51ac00%40chromium.org.
For more options, visit https://groups.google.com/a/chromium.org/groups/opt_out.

Adrian Aichner

unread,
Nov 20, 2013, 7:54:19 PM11/20/13
to Andrew Luly, Chromium-extensions
Under
chrome://chrome-urls/
you'll also find
chrome://sync-internals/
which has a `Sync Node Browser`

I don't see much there because my data is encrypted.

But you should be able to easily debug sync storage of a given site with a little devtools snippet you run against the page of interest.

chrome.storage.sync.get(null, function(items) {
    try {
        if (chrome.runtime.lastError) {
            console.warn(chrome.runtime.lastError.message);
        } else {
            console.log(Object.getOwnPropertyNames(items));
        // console.log(JSON.stringify(items));
        }
    } catch (exception) {
        window.alert('exception.stack: ' + exception.stack);
        console.error((new Date()).toJSON(), "exception.stack:", exception.stack);
    }
});



On Thu, Nov 21, 2013 at 1:26 AM, Andrew Luly <andre...@gmail.com> wrote:
I know if i use chrome.storage.local.set I can go to the BG page in chrome://extensions and view the localstorage there... However is there any way to do this with the chrome.storage.sync?

Thanks!

--

new 张

unread,
Dec 9, 2015, 6:01:08 AM12/9/15
to Chromium-Extensions-Announce
You need this:

https://chrome.google.com/webstore/detail/storage-area-explorer/ocfjjjjhkpapocigimmppepjgfdecjkb

在 2013年11月21日星期四 UTC+8上午8:26:04,Andrew Luly写道:
Reply all
Reply to author
Forward
0 new messages