如何在 VS Code 1.57 中禁用工作区信任? [英] How can I disable workspace trust in VS Code 1.57?

查看:63
本文介绍了如何在 VS Code 1.57 中禁用工作区信任?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚更新到 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?

推荐答案

在完全禁用受信任的工作区之前,请确保您了解 什么是可信工作区以及它们为何有用.

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

如果您仍想禁用受信任的工作区,请使用 Security › Workspace › Trust: Enabled 设置:

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

"security.workspace.trust.enabled": false

这将回到 VS Code 1.56 中的行为.

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

如果您只想禁用打开新工作区时显示的提示,请设置:

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

如果您处理多个您信任的项目,并且不想被提示单独信任每个项目,您可以考虑信任它们的父文件夹.为此:

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. 运行工作区:管理工作区信任命令
  2. 向下滚动到 Trusted folders and workspaces 部分,然后单击 Add Folder
  3. 选择所有受信任工作区的父文件夹
  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

这篇关于如何在 VS Code 1.57 中禁用工作区信任?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆