代码 .不被识别为内部或外部命令 [英] code . is not recognized as an internal or external command
本文介绍了代码 .不被识别为内部或外部命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在Visual Studio代码中使用cmd打开目录,但在cmd中却给我错误.那么,为此需要什么设置?
I want to open directory using cmd in visual studio code but its give me error in cmd. So, What setting is require for that?
我已经执行了以下命令
D:\RND>code .
推荐答案
需要进行设置,以便在您的PATH
中找到代码.如果您使用的是 mac 系统,请执行以下操作(对于Windows系统,请阅读以下内容):
It needs to be setup so that Code is found in your PATH
. If you're on a mac system, do the following (for windows systems, read below):
- 启动VS代码
- 打开命令选项板(按 F1 ),然后键入
shell command
来找到Shell Command: Install 'code' command in PATH command
. - 重启终端
- Launch VS Code
- Open up command palette (press F1) and type
shell command
to findShell Command: Install 'code' command in PATH command
. - Restart terminal
如果您使用的是Windows,还可以通过添加以下内容来手动设置PATH:
If you're on Windows, you can also set the PATH manually by adding:
C:\Program Files (x86)\Microsoft VS Code\bin
到您的PATH环境变量.
to your PATH environment variable.
- 打开命令提示符
- 键入setx路径%path%; C:\ Program Files(x86)\ Microsoft VS Code \ bin"
- 重启终端
这篇关于代码 .不被识别为内部或外部命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文