繁体   English   中英

VS 代码无法使用代码从终端打开。 命令 windows 11

[英]VS code not opening from terminal with code . command in windows 11

当我尝试用“代码”打开时。 来自 windows 终端的命令,它抛出错误。

code : The term 'code' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ code .
+ ~~~~
    + CategoryInfo          : ObjectNotFound: (code:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

之前开的还不错不知道发生了什么。 我尝试重新安装,问题仍然存在

CMD where code的结果是什么? 它应该是C:\Program Files\Microsoft VS Code\bin\code , C:\Program Files\Microsoft VS Code\bin\code.cmd如果你在默认位置安装 VSCode。

请将code的父文件夹路径添加到Path的系统环境中。

暂无
暂无

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

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