简体   繁体   English

缺少 VSCode Settings.json

[英]VSCode Settings.json is missing

I'm following a tutorial and I'm trying to point vscode to my virtual workspace I had set up for Scrapy, but when I open settings in VSCode, Workspace Settings tab is not there next to User Settings tab.我正在学习教程,并且试图将 vscode 指向我为 Scrapy 设置的虚拟工作区,但是当我在 VSCode 中打开设置时,“用户设置”选项卡旁边没有“工作区设置”选项卡。 Also I tried to go to file manually by going to %APPDATA%\\Code\\User\\settings.json which I got from here: https://vscode.readthedocs.io/en/latest/getstarted/settings/ but settings.json isn't in there.我还尝试通过转到我从这里获得的 %APPDATA%\\Code\\User\\settings.json 手动转到文件: https : //vscode.readthedocs.io/en/latest/getstarted/settings/但 settings.json不在里面How can I get this setting to appear or get to my settings.json file so I can make the necessary edits.我怎样才能让这个设置出现或进入我的 settings.json 文件,以便我可以进行必要的编辑。 Any help is appreciated.任何帮助表示赞赏。

You should use the official documentation for this sort of thing as it's up to date, the readthedocs version appears to be an out of date rip of the website from the past.您应该使用官方文档来处理此类事情,因为它是最新的,readthedocs 版本似乎是过去网站的过时版本。

The path you mention %APPDATA%\\Code\\User\\settings.json is user settings, not workspace settings, workspace settings are located under the folder you have opened at <folder>\\.vscode\\settings.json .您提到的路径%APPDATA%\\Code\\User\\settings.json是用户设置,而不是工作区设置,工作区设置位于您在<folder>\\.vscode\\settings.json处打开的<folder>\\.vscode\\settings.json They don't exist by default but will be created when you open workspace settings and make some changes.默认情况下它们不存在,但会在您打开工作区设置并进行一些更改时创建。

To open settings press ctrl + , , select the workspace settings button and change some settings:要打开设置,请按ctrl + , ,选择工作区设置按钮并更改一些设置:

在此处输入图片说明

You can access the actual file by clicking the button with the file icon in the top-right:您可以通过单击右上角带有文件图标的按钮访问实际文件:

在此处输入图片说明

Just press CTRL + SHIFT + P, type workspace settings and press ENTER .只需按 CTRL + SHIFT + P,输入workspace settings ,然后按ENTER If you want to see the json file, just press the {} button and vscode will automaticaly open or create the file in your workspace.如果您想查看 json 文件,只需按{}按钮,vscode 将自动在您的工作区中打开或创建该文件。

VSCode Command Pallete VSCode 命令面板

It appears that coming in v1.44 will be command to open workspace settings - the editable json file - directly from the Command Palette.看来 v1.44 中的命令将直接从命令面板打开工作区设置- 可编辑的 json 文件。 See No command to open workspace settings JSON #93189请参阅没有命令打开工作区设置 JSON #93189

从命令面板打开工作区设置 (json)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM