Service worker - developer tools now showing Local Storage

1,082 views
Skip to first unread message

Don Schmitt

unread,
Jun 18, 2022, 7:47:53 PM6/18/22
to chromium-extensions
I'm using chrome.storage.local.set and chrome.storage.local.get in my service worker and they are working, but when I view Application.Local Storage in the dev tools I'm not seeing anything.

Am I missing something?

hrg...@gmail.com

unread,
Jun 18, 2022, 10:43:56 PM6/18/22
to Chromium Extensions, Don Schmitt
chrome.storage.local and window.localStorage are entirely different and separate storage APIs.

Don Schmitt

unread,
Jun 19, 2022, 12:59:00 PM6/19/22
to hrg...@gmail.com, Chromium Extensions
So...are there no developer tools for viewing data stored at chrome.storage.local?

Juraj M.

unread,
Jun 19, 2022, 1:04:24 PM6/19/22
to Chromium Extensions, Don Schmitt, Chromium Extensions, hrg...@gmail.com
You can use the console, simply execute this:
```
await chrome.storage.local.get()
```
That's what I use. You can't edit the values but for viewing it's ok.

Arpit

unread,
Jun 20, 2022, 12:43:58 PM6/20/22
to Chromium Extensions, Don Schmitt, Chromium Extensions, hrg...@gmail.com

ka...@couponfollow.com

unread,
Jul 13, 2022, 3:11:50 AM7/13/22
to Chromium Extensions, Arpit, Don Schmitt, Chromium Extensions, hrg...@gmail.com
I believe this extension doesn't work with service workers. Or at least it doesn't work for my team... 

Robbi

unread,
Jul 13, 2022, 5:57:50 AM7/13/22
to Chromium Extensions, Don Schmitt
"but when I view Application.Local Storage in the dev tools I'm not seeing anything. "
With MV3 extension, localStorage can be view only inspecting an extension page but not the service worker (don't ask me why)
If you have not a extension page you can inspect  the manifest fiile  chrome-extension://<your_extension_id>/manifest.json

Fabio Selau

unread,
Sep 3, 2023, 10:30:39 PM9/3/23
to Chromium Extensions, Robbi, Don Schmitt
Thanks for this!
Reply all
Reply to author
Forward
0 new messages