Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I disable workspace trust in VS Code 1.57?

I just updated to VS Code 1.57 and am now getting prompted about trusting my workspaces. How can I disable this and go back to the old behavior?

like image 656
Matt Bierner Avatar asked Jun 10 '21 04:06

Matt Bierner


People also ask

How do I change my workspace settings in VS Code?

To open the Settings editor, use the following VS Code menu command: On Windows/Linux - File > Preferences > Settings. On macOS - Code > Preferences > Settings.


1 Answers

Before disabling trusted workspaces entirely, make sure you understand what trusted workspaces are and why they can be helpful.

Disabling workspace trust entirely

If you still want to disable trusted workspaces, use the Security › Workspace › Trust: Enabled setting:

"security.workspace.trust.enabled": false

This will go back to the behavior in VS Code 1.56.

Disabling the workspace trust prompt

If you just want to disable the prompt that shows when opening a new workspace, set:

"security.workspace.trust.startupPrompt": "never"

This will disable the prompt but keep trusted workspaces enabled. Keep in mind that this means that all new workspace will start in untrusted mode

Maintaining a trusted folder for project

If you work with many projects that you trust and don't want to be prompted about trusting each one individually, you can consider trusting their parent folder. To do this:

  1. Run the Workspaces: Manage Workspace Trust command
  2. Scroll down to the Trusted folders and workspaces section and click Add Folder
  3. Select the parent folder of all your trusted workspaces

Now any project you open under the parent folder will be trusted automatically. You will still be prompted when opening a workspace outside of the parent fold

This is a good compromise. With it, when cloning a new project you simply choose if it goes into your trusted folder or not

like image 117
Matt Bierner Avatar answered Oct 17 '22 01:10

Matt Bierner