How to open Visual Studio Code from Terminal - (MAC)

How to open Visual Studio Code from Terminal - (MAC)

ยท

1 min read

I recently discovered a quick way to launch Visual Studio Code from the terminal.

To do so, launch Terminal on your Mac and enter the following code:

$ code .

To open a specific directory

$ code PATH

This will open VS Code ๐ŸŽ‰

If you are encountering some error using this command in the Mac terminal, then here is the solution:

Error: Shell Command: Install 'code' command in PATH

Inside Visual Studio Code, pressed cmd + shift + p and search for path and choose the following command:

Path add

This will fix the error and you can open VS Code from terminal.

Thanks for reading

Follow me on Twitter

Thanks for reading!

ย