问题
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.
回答1:
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 in the top-right:
回答2:
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
来源:https://stackoverflow.com/questions/55434687/vscode-settings-json-is-missing