Visual Studio Code, or VS Code, is one of the most popular code editors available today, lightweight, powerful, and packed with extensions for every developer need. Whether you’re writing JavaScript, Python, Flutter, or C++, VS Code gives you a clean, flexible workspace to get started quickly.
In this guide, we’ll walk you through how to install Visual Studio Code on macOS, set up the command-line access, and configure the essentials so you can start coding right away.
Install Visual Studio Code on macOS
The first step is to grab the official installation package. After that, the installing VS Code on macOS is straightforward since it doesn’t require an installer.
1. Open your browser and visit the official Visual Studio Code download page.
2. Under the macOS section, click the macOS Universal download button. This version works on both Intel-based Macs and Apple Silicon (M1, M2, M3) chips.
3. Once the download is complete, you’ll get a file named something like VSCode-darwin-universal.dmg
4. Open your Downloads folder and locate the .dmg file you just downloaded.
5. Double-click it to open it and drage the VS code icon into your Applications folder.

That’s it. VS Code is now installed on your Mac.
To open it for the first time, go to Applications → Visual Studio Code, or use Spotlight Search (Cmd + Space) and type “Visual Studio Code”.
How to Allow VS Code to Run on macOS
When you open VS Code for the first time, macOS may warn that it was downloaded from the internet. Simply click Open to confirm. You can also check “Don’t warn me again” to avoid this message in the future.
Once VS Code launches, you’ll see the clean interface with a “Start” section that lets you open folders, create new files, or clone Git repositories.

How to Enable the ‘code’ Command in Terminal
One of the best features of VS Code is that you can open any folder directly from the terminal using the code command, but you need to enable it first.
1. Open Visual Studio Code.
2. Press Cmd + Shift + P to open the Command Palette.
3. Type Shell Command: Install ‘code’ command in PATH.
4. Press Enter when the option appears.
5. Now, open Terminal and test it by typing:
code .
This command opens the current directory in VS Code — a handy shortcut for developers working with multiple projects.
How to Install Essential Extensions on VS Code on macOS
VS Code’s real power lies in its extensions. You can enhance functionality for almost any programming language or workflow.
To install extensions:
1. Click the Extensions icon on the left sidebar (or press Cmd + Shift + X).
2. In the search box, type the name of the extension you want to install.
3. Click Install next to your chosen one.

Here are a few must-have extensions for most developers:
- Prettier – Code Formatter → Formats your code automatically for better readability.
- ESLint → Detects and fixes JavaScript and TypeScript issues.
- Python → Adds support for running and debugging Python code.
- GitLens → Enhances Git integration and version control.
- Live Server → Instantly previews web pages in your browser as you code.
How to Change Your Theme and Font
You can personalize your VS Code environment to suit your preferences.
To change the theme:
- Press Cmd + K, then Cmd + T.
- Choose from popular built-in themes like Dark+, Light+, or Monokai.
To adjust your font size or family:
- Go to Code → Preferences → Settings.
- Search for font size or font family.
- Adjust the values according to your preference.
Customizing your workspace helps make coding more comfortable and visually appealing.
How to Run Your First Program on VS Code
Now that VS Code is set up, let’s test it with a simple JavaScript program.
1. Click File → New File.
2. Save it as app.js.
3. Type this line of code:
console.log("Hello from VS Code on macOS!");
4. Open the integrated terminal (press Ctrl + ` or go to View → Terminal).
5. Run the program using: node app.js
If you see the message printed in the terminal, everything is working perfectly.
Conclusion
Installing Visual Studio Code on macOS is quick, lightweight, and beginner-friendly. With its wide range of extensions, integrated terminal, and customizable interface, it’s one of the best editors for developers — whether you’re writing JavaScript, Python, Flutter, or web apps.
By enabling the code command, customizing your environment, and exploring extensions, you’ll have a complete development setup in minutes. Now that your VS Code is ready to go, it’s time to start coding, debugging, and creating, all from the comfort of your Mac.