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.
1. Download Visual Studio Code for macOS
The first step is to grab the official installation package.
- Open your browser and visit the official Visual Studio Code download page.
- 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.
- Once the download is complete, you’ll get a file named something like
VSCode-darwin-universal.zip.
2. Install Visual Studio Code
Installing VS Code on macOS is straightforward since it doesn’t require an installer.
- Open your Downloads folder and locate the
.zipfile you just downloaded. - Double-click it to extract the application.
- Drag the extracted Visual Studio Code.app file 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”.
3. Allow VS Code to Run (First-Time Launch)
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.
4. 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.
- Open Visual Studio Code.
- Press Cmd + Shift + P to open the Command Palette.
- Type Shell Command: Install ‘code’ command in PATH.
- Press Enter when the option appears.
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.
5. Update VS Code (Optional but Recommended)
VS Code updates frequently with new features and performance improvements.
To check for updates manually:
- Open VS Code.
- Click the Code menu (in the top macOS menu bar).
- Select Check for Updates.
If an update is available, VS Code will automatically download and install it.
6. Install Essential Extensions
VS Code’s real power lies in its extensions. You can enhance functionality for almost any programming language or workflow.
To install extensions:
- Click the Extensions icon on the left sidebar (or press Cmd + Shift + X).
- In the search box, type the name of the extension you want to install.
- 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.
7. Change Your Theme and Font (Optional Customization)
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.
8. Run Your First Program
Now that VS Code is set up, let’s test it with a simple JavaScript program.
- Click File → New File.
- Save it as
app.js. - Type this line of code:
console.log("Hello from VS Code on macOS!"); - Open the integrated terminal (press Ctrl + ` or go to View → Terminal).
- Run the program using:
node app.js
If you see the message printed in the terminal, everything is working perfectly.
9. Uninstall VS Code (If You Ever Need To)
If you decide to remove VS Code, the process is simple:
- Close VS Code completely.
- Open your Applications folder.
- Drag Visual Studio Code.app to the Trash.
- Optionally, delete user data stored in:
~/.vscode/This removes extensions, settings, and workspace history.
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.