visual studio code “Shell Command: Install 'code' command in PATH command.”

后端 未结 10 747
感动是毒
感动是毒 2020-12-31 01:57

I just started with Angular. I installed angular/cli and added a project. Now I want to use visual studio code.

I Open the Command Palette (Ctrl +

相关标签:
10条回答
  • 2020-12-31 02:34

    With Windows it is installed by default so you don't need to add path. Just run " code . " in cmd and it will work fine

    0 讨论(0)
  • 2020-12-31 02:35

    If in Visual Studio Code doesn't appear that option and the installation didn't add to the path directly, you can add the Visual Studio Code bin folder manually to the path and it starts to work.

    Go to the Enviroment Variables and edit the Path user variable. Inside of it, add a new variable with the current bin path of your Visual Studio Code installation. Mine, for example, is "C:\Users\Inazio\AppData\Local\Programs\Microsoft VS Code\bin"

    After that, you can start to use the code command in your OS

    0 讨论(0)
  • 2020-12-31 02:37

    it is already installed on Windows. You just have to make cmd path where the project created (e.g C:\WINDOWS\system32> cd C:\WINDOWS\system32\hello-world), then run the the comamnd "code ." like this (C:\Windows\System32\hello-world>code .)

    I got this from VS Code documentation

    0 讨论(0)
  • 2020-12-31 02:40

    I was having the same exact problem and when i checked my PATH variable it said that the path was something\something\Microsoft VS Code . then i remembered my folder's name was Visual Studio Code.After I renamed it back everything works.

    0 讨论(0)
  • 2020-12-31 02:43

    I had this same problem. Long story short, I uninstalled VS Code, re-downloaded the installer package and ran that. Sure enough, one of the install screens has a checkbox option to add to the PATH variable and this option is unchecked by default.

    Checked the box, finished the install, works fine.

    Of course it's perfectly valid to modify the PATH variable after install, but I think it's important to clarify that (at least version 1.23.0) does not update PATH by default. Most of the threads I looked at says it does.

    0 讨论(0)
  • 2020-12-31 02:43

    This works for me

    For Windows users

    Open Environment Variables

    System > Advance system settings > Advanced tab > environment variables on system variables click on Path and click Edit and add new Path named

    "C:\Users\Your-Username\AppData\Local\Programs\Microsoft VS Code\bin"
    

    For window users follow steps below and add new Path, after doing so restart your terminal you will get code command on your terminal

    0 讨论(0)
提交回复
热议问题