I am trying to do a simple JS exercise using localStorage to store some values; when I try to inspect these values using Chrome devtools I can't see the keys
Is there any setting so that I can see it with every key?
Edit:
I am trying to set this value using
localStorage.setItem('Try', 'This is a try');
console.log(localStorage.getItem('Try'));
and the "This is a try" is correctly logged in the console.
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.
# View localStorage keys and valuesClick the Application tab to open the Application panel. Expand the Local Storage menu. Click a domain to view its key-value pairs. Click a row of the table to view the value in the viewer below the table.
Therefore, if you're accessing localStorage from your contentscript, it will be the storage from that webpage, not the extension page storage. Now, to let your content script to read your extension storage (where you set them from your options page), you need to use extension message passing. chrome.
Your window showing the value seems to be moved all the way up
hover the mouse on the line between the "This is a try" and "Key", click and drag down.
you should see the covered screen then
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