microsoft / vscode-docs

Public documentation for Visual Studio Code
http://code.visualstudio.com/docs
Other
5.56k stars 4.51k forks source link

Using Clang "code ." command on macOS, command not found #7403

Open celdin7 opened 2 weeks ago

celdin7 commented 2 weeks ago

First time coder here, and I'm struggling to get off the ground. I'm using VS Code to learn C++, which recommends using Clang as the compiler for macOS, but when I use Terminal to connect with VS Code, the "code ." command isn't recognized.

Here's the VS Code tutorial I'm following: https://code.visualstudio.com/docs/cpp/config-clang-mac

I've installed the C++ extension and checked I have Clang installed like it says, but when I input the lines the tutorial gives into Terminal...

mkdir projects cd projects mkdir helloworld cd helloworld code .

it runs as expected until the last line. It just reads

-bash: code: command not found

ntrogh commented 2 weeks ago

@celdin7 Thanks for using VS Code for learning C++. I assume you have installed VS Code on your Mac? Can you make sure that VS Code is added to the PATH environment variable by following these instructions: https://code.visualstudio.com/docs/setup/mac#_launching-from-the-command-line