“代码".命令不起作用 [英] "code ." command is not working

查看:41
本文介绍了“代码".命令不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到此错误:

code . 不是外部或内部命令,也不是可运行的程序或批处理文件

code . is not recognised as an external or internal command, operable program or batch file

此外,shell 命令没有出现在我的编译器 VS 代码中,setx path "%path%;C:\Program Files\Microsoft VS Code" 也没有在命令提示符中工作.

moreover shell commands are not coming in my compiler VS code neither do setx path "%path%;C:\Program Files\Microsoft VS Code" is working in command prompt .

推荐答案

我找到了.在搜索"中输入环境变量,然后点击编辑系统环境变量".

I found it. In the "search" type environment variables then click on the "edit system environment variables".

Inside Environment variables->Path put C:\Users\{your_username}\AppData\Local\Programs\Microsoft VS Code\bin.

Inside Environment variables->Path put C:\Users\{your_username}\AppData\Local\Programs\Microsoft VS Code\bin.

转到项目文件夹并打开 cmd 并在位置栏中键入,然后键入 code .

Go to the project folder and open the cmd with it typing in the location bar and then type code .

那就行了.

这篇关于“代码".命令不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆