Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does VS Code remember trusted workspaces?

I would like to know how VS Code remembers which folders, repos and workspaces are "trusted". That is, where is it stored? In my personal case I want to know for Linux and Mac installations, but others may be interested in where it's stored in Windows too.

enter image description here

like image 667
Sk606 Avatar asked Sep 21 '25 08:09

Sk606


1 Answers

When you run code . in a directory, Visual Studio Code create a workspace (for example, 504186ccde2f6d27a29b695ad0ceb3dc) in

$HOME/.config/Code/User/workspaceStorage # Linux
$HOME/Library/Application Support/Code/User/workspaceStorage # macOS
C:/Users/YourUser/AppData/Roaming/Code/User/workspaceStorage # Windows

In 504186ccde2f6d27a29b695ad0ceb3dc, there is a file, state.vscdb (an SQLite database), which contains a key, workspace.trust.startupPrompt.shown.

like image 120
Philippe Avatar answered Sep 22 '25 23:09

Philippe