Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to inspect contents of storage.local in Chrome Packaged App?

Is there some way (extension, or special debug option) to inspect contents of storage in Chrome Packaged App, other than using javascript console?

Resources tab only allows inspection of localStorage/sessionStorage (which is disabled in packaged apps)

like image 360
jusio Avatar asked Sep 08 '13 02:09

jusio


People also ask

How do I inspect local storage in Chrome?

It's simple. Just go to the developer tools by pressing F12 , then go to the Application tab. In the Storage section expand Local Storage. After that, you'll see all your browser's local storage there.

Can content scripts access Chrome storage?

User data can be automatically synced with Chrome sync (using storage. sync ). Your extension's content scripts can directly access user data without the need for a background page.

How does Chrome local storage work?

localStorage is a property that allows JavaScript sites and apps to save key-value pairs in a web browser with no expiration date. This means the data stored in the browser will persist even after the browser window is closed.

Does Chrome sync local storage?

Local and Sync Storage Many browsers, including Chrome, support localStorage , which is similar to persistent cookies in that it stores KVPs. The main difference is that localStorage has greater capacity and isn't passed to the server along with HTTP requests.


2 Answers

Try just typing:

chrome.storage.local.get(function(data) {
  console.log(data);
}); 

then look in the console.

like image 121
kzahel Avatar answered Sep 29 '22 20:09

kzahel


After I've realised that there is really no other option but JS console, I've created devtools extension (took 4 hours to create initial version), which can inspect chrome.storage.

So now there is such tool=)

Sources

like image 21
jusio Avatar answered Sep 29 '22 20:09

jusio