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)
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.
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.
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.
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.
Try just typing:
chrome.storage.local.get(function(data) {
console.log(data);
});
then look in the console.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With