文档中提到了一种叫做代码的可执行文件,但我不确定在哪里可以找到它,所以我可以把它放在我的路径上。我从VSCode网站下载的zip文件不包括任何这样的可执行文件。(我可以很好地运行.app。)
这是windows独有的功能吗?
文档中提到了一种叫做代码的可执行文件,但我不确定在哪里可以找到它,所以我可以把它放在我的路径上。我从VSCode网站下载的zip文件不包括任何这样的可执行文件。(我可以很好地运行.app。)
这是windows独有的功能吗?
当前回答
从Visual Studio代码设置页面:
Tip: If you want to run VS Code from the terminal by simply typing 'code', VS Code has a command, Shell Command: Install 'code' command in PATH, to add 'code' to your $PATH variable list. After installation, launch VS Code. Now open the Command Palette (F1 or ⇧+⌘+P on Mac) and type shell command to find the Shell Command: Install 'code' command in PATH command. After executing the command, restart the terminal for the new $PATH value to take effect. You'll be able to simply type 'code .' in any folder to start editing files in that folder.
其他回答
VSCode现在在1.58版本中支持开箱即用。类型:
$ cd path/to/your/directory
$ code .
对于我来说,在Macbook Book Pro 2019 MacOS版本10.15.6上,在VSCode中打开命令面板的快捷方式是Shift + command + P。
打开它,你只需要写安装代码,然后按enter键。
之后,只需打开终端,输入代码,你的vscode将开始打开。
在打开VSC并按下(Command + Up + P)后,我尝试输入“shell Command”,但什么都没有出现。为了得到“Shell Command: Install 'code' Command In PATH Command”,你必须执行以下命令:
按(Command, Up, P) 输入>(这将显示并运行命令) 然后在PATH命令中输入Shell命令:Install 'code'命令。然后它就会出现。 一旦你点击它,它会更新,你应该很好!
从命令行文档启动MacOS X
如果你在下载文件夹中安装你的vs code,你需要将vs code移动到应用程序文件夹,然后打开vs code,然后按shift + command + p,你会看到下图。然后你需要输入代码。现在可以开始了。
只要更新你的python到python3.9,我这样做了,它为我工作。