There are so many ways to open a project in VS code. My favorite is to navigate to the project directory from my terminal and invoke VS code on the directory by simply typing code .
However, sometimes the magic wand doesn't work, especially after a new installation of VS Code. It would instead just spit out zsh: command not found: code
in the terminal. So how do you solve this?
- Open your VS code
- Press
Command + Shift + P
. This will open the command palette. - Then search for
shell command
. - Select
Install 'code' command in PATH
. You might be prompted to type in your password. That's it. - Head over to your terminal and type
code .
.
That's it! Happy coding!
Top comments (2)
It worked, thank you
thank you very much