upleveled / system-setup

Set up a PERN development environment on Windows, macOS and Linux
28 stars 19 forks source link

Add step to set up `code .` on command line #46

Open ProchaLu opened 1 year ago

ProchaLu commented 1 year ago

Some students have encountered difficulties when using the code . command to open Visual Studio Code via the command line. When attempting to execute the command, they receive the following error message:

Paulines-MacBook-Pro:next-js-portfolio-web paulineerika$ code .
-bash: code: command not found

Add a simple step to set up the Shell Command in VS Code in all System Setup guides


Steps to fix this issue:

  1. Start by opening Visual Studio Code
  2. ctrl/cmd-shift-P to open the Command Palette within Visual Studio Code
  3. In the Command Palette, type shell command to search for the Shell Command: Install 'code' command in PATH option
  4. Select the Shell Command: Install 'code' command in PATH option by clicking on it or pressing Enter