Skip to main content
Stack Overflow
  1. About
  2. For Teams

Return to Answer

Post Timeline

Commonmark migration
Source Link

Sometimes setting path from VS Code command palette does not work

Instead manually add your VS Code to your path:

  1. Run in terminal

    sudo nano /etc/paths

  2. Go to the bottom of the file, and enter the path you wish to add

  3. Hit control-x to quit. Enter "Y" to save the modified buffer.

  4. Restart your terminal and to test echo $PATH. You should something similar

~ echo $PATH /Users/shashank/.nvm/versions/node/v8.9.2/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin

Next time, you navigate to your project folder from terminal

###Enter:

Enter:

code . ###or

or

code /path/to/project

Source

Sometimes setting path from VS Code command palette does not work

Instead manually add your VS Code to your path:

  1. Run in terminal

    sudo nano /etc/paths

  2. Go to the bottom of the file, and enter the path you wish to add

  3. Hit control-x to quit. Enter "Y" to save the modified buffer.

  4. Restart your terminal and to test echo $PATH. You should something similar

~ echo $PATH /Users/shashank/.nvm/versions/node/v8.9.2/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin

Next time, you navigate to your project folder from terminal

###Enter:

code . ###or code /path/to/project

Source

Sometimes setting path from VS Code command palette does not work

Instead manually add your VS Code to your path:

  1. Run in terminal

    sudo nano /etc/paths

  2. Go to the bottom of the file, and enter the path you wish to add

  3. Hit control-x to quit. Enter "Y" to save the modified buffer.

  4. Restart your terminal and to test echo $PATH. You should something similar

~ echo $PATH /Users/shashank/.nvm/versions/node/v8.9.2/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin

Next time, you navigate to your project folder from terminal

Enter:

code .

or

code /path/to/project

Source

Improved formatting
Source Link
Shashank K
  • 408
  • 5
  • 13

Sometimes setting path from VS Code command palette does not work

Instead manually add your VS Code to your path:

  1. Run in terminal

    Run in terminal

    sudo nano /etc/paths

  2. Go to the bottom of the file, and enter the path you wish to add

  3. Hit control-x to quit. Enter "Y" to save the modified buffer.

  4. Restart your terminal and to test echo $PATH. You should something similar

sudo nano /etc/paths
  1. Go to the bottom of the file, and enter the path you wish to add
  2. Hit control-x to quit. Enter "Y" to save the modified buffer.
  3. Restart your terminal and to test echo $PATH. You should something similar

~ echo $PATH /Users/shashank/.nvm/versions/node/v8.9.2/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin

Next time, you navigate to your project folder from terminal

###Enter:


###orcode . ###or code /path/to/project

Source

Sometimes setting path from VS Code command palette does not work

Instead manually add your VS Code to your path:

  1. Run in terminal
sudo nano /etc/paths
  1. Go to the bottom of the file, and enter the path you wish to add
  2. Hit control-x to quit. Enter "Y" to save the modified buffer.
  3. Restart your terminal and to test echo $PATH. You should something similar

~ echo $PATH /Users/shashank/.nvm/versions/node/v8.9.2/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin

Next time, you navigate to your project folder from terminal

###Enter:


###or code /path/to/project

Source

Sometimes setting path from VS Code command palette does not work

Instead manually add your VS Code to your path:

  1. Run in terminal

    sudo nano /etc/paths

  2. Go to the bottom of the file, and enter the path you wish to add

  3. Hit control-x to quit. Enter "Y" to save the modified buffer.

  4. Restart your terminal and to test echo $PATH. You should something similar

~ echo $PATH /Users/shashank/.nvm/versions/node/v8.9.2/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin

Next time, you navigate to your project folder from terminal

###Enter:

code . ###or code /path/to/project

Source

improved solution
Source Link
Shashank K
  • 408
  • 5
  • 13

Sometimes setting path from VS Code command palette does not work

Instead manually add your VS Code to your path:

cat << EOF >> ~/.bash_profile
# Add Visual Studio Code (code)
export PATH="$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
EOF
  1. Run in terminal
sudo nano /etc/paths
  1. Go to the bottom of the file, and enter the path you wish to add
  2. Hit control-x to quit. Enter "Y" to save the modified buffer.
  3. Restart your terminal and to test echo $PATH. You should something similar

~ echo $PATH /Users/shashank/.nvm/versions/node/v8.9.2/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin

Next time, you navigate to your project folder from terminal

###Enter:


###or code /path/to/project

You can also try editing /etc/pathsSource to permanently add to $PATH

Sometimes setting path from VS Code command palette does not work

Instead manually add your VS Code to your path:

cat << EOF >> ~/.bash_profile
# Add Visual Studio Code (code)
export PATH="$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
EOF

Next time, you navigate to your project folder from terminal

###Enter:


###or code /path/to/project

You can also try editing /etc/paths to permanently add to $PATH

Sometimes setting path from VS Code command palette does not work

Instead manually add your VS Code to your path:

  1. Run in terminal
sudo nano /etc/paths
  1. Go to the bottom of the file, and enter the path you wish to add
  2. Hit control-x to quit. Enter "Y" to save the modified buffer.
  3. Restart your terminal and to test echo $PATH. You should something similar

~ echo $PATH /Users/shashank/.nvm/versions/node/v8.9.2/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin

Next time, you navigate to your project folder from terminal

###Enter:


###or code /path/to/project

Source

added 273 characters in body
Source Link
Shashank K
  • 408
  • 5
  • 13
Loading
Source Link
Shashank K
  • 408
  • 5
  • 13
Loading

AltStyle によって変換されたページ (->オリジナル) /