How do I find out where Visual Studio Code holds its localstorage data?

I have finished the Learn localStorage course. I could see the localStorage in my Browser Console but was wondering where Visual Studio Code holds local Storage data. Not sure where to ask this (JavaScript or General?)

The Web Storage API is a browser API, your editor has nothing to do with it. It is stored in the browser.

Thank you for replying

Which browser? I closed my Firefox browser before I started the code in VS Code. It worked fine in VS Code, using data as the key. When I closed VS Code and restarted my computer and went back into VS Code the tasks were still there. I then looked in my Firefox browser console but there was no local storage for data.

Whatever browser ran the code.

You can use the Storage Inspector inside Firefox.

https://firefox-source-docs.mozilla.org/devtools-user/storage_inspector/index.html

(In Chrome is it on the Application tab of the dev tools)

I’m still confused

This is what I get right now from Firefox Storage Inspector:

and this is what I get from Chrome (which is where I think my VS Code is running, but I’m not 100% sure about that)
image

This is what my VS Code looks like:

and when I press Run Without Debugging I get this:

You need to selected/click the items inside the menu.

> Local Storage
  The storage item for that domain

Also, serve the page using something like the Liver Server extension.

For documents loaded from file: URLs (that is, files opened in the browser directly from the user’s local filesystem, rather than being served from a web server) the requirements for localStorage behavior are undefined and may vary among different browsers.

This is what I get from Chrome:
image

and
image

This is what I get from Firefox:

I don’t understand what you mean by
Also, try serving the page using something like the Liver Server extension.

Where, and how, would I do that?

I updated my post with the link to the extension.

1 Like

Thank you - I’ll read these and get back to you

Thank you for you assistance - you made me think about the fact that VSCode asked me whether I wanted to use Web (Chrome) - whereas I was just thinking Chrome.

So I googled and got the following:

and so I looked there and there were the databases!

So now I know :slight_smile:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.