Skip to main content
added 111 characters in body
Source Link
Venkat Ramana
  • 538
  • 1
  • 6
  • 16

I am assuming you've checked this link.

VSCode application generally resides in /Applications/Visual Studio Code.app/Contents/Resources/app/bin/code.

Follow these steps to access VSCode through code on shell.

  1. Open bash_profile page

    sudo vi /etc/paths 
  2. Add an extra line in the list of PATH folders as

    /Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/ 
  3. Exit from vi: Esc > :wq! > Enter Key

Restart shell. Then do echo $PATH to confirm VSCode has been added successfully.

Check code command is added by typing which code. You should see VSCode path printed on screen.

Try this link link if it doesn't work out.

Edit: I am using version 1.9.1 and after I ran Install code command in Path it got added permanently.

VSCode application generally resides in /Applications/Visual Studio Code.app/Contents/Resources/app/bin/code.

Follow these steps to access VSCode through code on shell.

  1. Open bash_profile page

    sudo vi /etc/paths 
  2. Add an extra line in the list of PATH folders as

    /Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/ 
  3. Exit from vi: Esc > :wq! > Enter Key

Restart shell. Then do echo $PATH to confirm VSCode has been added successfully.

Check code command is added by typing which code. You should see VSCode path printed on screen.

Try this link if it doesn't work out.

I am assuming you've checked this link.

VSCode application generally resides in /Applications/Visual Studio Code.app/Contents/Resources/app/bin/code.

Follow these steps to access VSCode through code on shell.

  1. Open bash_profile page

    sudo vi /etc/paths 
  2. Add an extra line in the list of PATH folders as

    /Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/ 
  3. Exit from vi: Esc > :wq! > Enter Key

Restart shell. Then do echo $PATH to confirm VSCode has been added successfully.

Check code command is added by typing which code. You should see VSCode path printed on screen.

Try this link if it doesn't work out.

Edit: I am using version 1.9.1 and after I ran Install code command in Path it got added permanently.

Source Link
Venkat Ramana
  • 538
  • 1
  • 6
  • 16

VSCode application generally resides in /Applications/Visual Studio Code.app/Contents/Resources/app/bin/code.

Follow these steps to access VSCode through code on shell.

  1. Open bash_profile page

    sudo vi /etc/paths 
  2. Add an extra line in the list of PATH folders as

    /Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/ 
  3. Exit from vi: Esc > :wq! > Enter Key

Restart shell. Then do echo $PATH to confirm VSCode has been added successfully.

Check code command is added by typing which code. You should see VSCode path printed on screen.

Try this link if it doesn't work out.