How to Install Visual Studio Code on macOS

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.

  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.zip.

2. Install Visual Studio Code

Installing VS Code on macOS is straightforward since it doesn’t require an installer.

  1. Open your Downloads folder and locate the .zip file you just downloaded.
  2. Double-click it to extract the application.
  3. 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.

  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.

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:

  1. Open VS Code.
  2. Click the Code menu (in the top macOS menu bar).
  3. 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:

  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.

7. Change Your Theme and Font (Optional Customization)

You can personalize your VS Code environment to suit your preferences.

To change the theme:

  1. Press Cmd + K, then Cmd + T.
  2. Choose from popular built-in themes like Dark+, Light+, or Monokai.

To adjust your font size or family:

  1. Go to Code → Preferences → Settings.
  2. Search for font size or font family.
  3. 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.

  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.

9. Uninstall VS Code (If You Ever Need To)

If you decide to remove VS Code, the process is simple:

  1. Close VS Code completely.
  2. Open your Applications folder.
  3. Drag Visual Studio Code.app to the Trash.
  4. 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.

Posted by Arpita

With a background in Computer Science, she is passionate about sharing practical programming tips and tech know-how. From writing clean code to solving everyday tech problems, she breaks down complex topics into approachable guides that help others learn and grow.

X