Sometimes setting path from VS Code command palette does not work
Instead manually add your VS Code to your path:
Run in terminal
sudo nano /etc/pathsGo to the bottom of the file, and enter the path you wish to add
Hit control-x to quit. Enter "Y" to save the modified buffer.
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
Sometimes setting path from VS Code command palette does not work
Instead manually add your VS Code to your path:
Run in terminal
sudo nano /etc/pathsGo to the bottom of the file, and enter the path you wish to add
Hit control-x to quit. Enter "Y" to save the modified buffer.
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
Sometimes setting path from VS Code command palette does not work
Instead manually add your VS Code to your path:
Run in terminal
sudo nano /etc/pathsGo to the bottom of the file, and enter the path you wish to add
Hit control-x to quit. Enter "Y" to save the modified buffer.
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
Sometimes setting path from VS Code command palette does not work
Instead manually add your VS Code to your path:
- Run in terminal
Run in terminal
sudo nano /etc/paths Go to the bottom of the file, and enter the path you wish to add
Hit control-x to quit. Enter "Y" to save the modified buffer.
Restart your terminal and to test
echo $PATH. You should something similar
sudo nano /etc/paths
- Go to the bottom of the file, and enter the path you wish to add
- Hit control-x to quit. Enter "Y" to save the modified buffer.
- 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
Sometimes setting path from VS Code command palette does not work
Instead manually add your VS Code to your path:
- Run in terminal
sudo nano /etc/paths
- Go to the bottom of the file, and enter the path you wish to add
- Hit control-x to quit. Enter "Y" to save the modified buffer.
- 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
Sometimes setting path from VS Code command palette does not work
Instead manually add your VS Code to your path:
Run in terminal
sudo nano /etc/pathsGo to the bottom of the file, and enter the path you wish to add
Hit control-x to quit. Enter "Y" to save the modified buffer.
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
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
- Run in terminal
sudo nano /etc/paths
- Go to the bottom of the file, and enter the path you wish to add
- Hit control-x to quit. Enter "Y" to save the modified buffer.
- 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:
- Run in terminal
sudo nano /etc/paths
- Go to the bottom of the file, and enter the path you wish to add
- Hit control-x to quit. Enter "Y" to save the modified buffer.
- 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