简体   繁体   中英

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. 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.How can I get this setting to appear or get to my settings.json file so I can make the necessary edits. 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.

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 . 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:

在此处输入图片说明

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 . If you want to see the json file, just press the {} button and vscode will automaticaly open or create the file in your workspace.

VSCode Command Pallete

It appears that coming in v1.44 will be command to open workspace settings - the editable json file - directly from the Command Palette. See No command to open workspace settings JSON #93189

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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