Install ESP-IDF Extension for ESP32 on VS Code (Windows, Mac OS X, Linux)

Learn how to install the ESP-IDF extension for ESP32 boards on VS Code IDE (Microsoft Visual Studio Code) on Windows, Mac OS X or Linux Ubuntu operating systems.

Install ESP-IDF Extension for ESP32 on VS Code (Windows, Mac OS X, Linux)

Introduction to ESP-IDF (Espressif IoT Development Framework)

ESP-IDF, Espressif IoT Development Framework, is the original framework developed by Espressif (the developer of ESP32 chips) to program the ESP32. It is an SDK to develop applications for ESP332 chips using C and C++ programming languages that gives you low-level access to the hardware.

Being the “official” way to program the ESP32, it means the SDK is frequently updated to support the release of newer versions of ESP32 chips. On the other hand, it may take a while for new chips to be supported in the Arduino IDE. The following table shows the current supported ESP32 SoC series by ESP-IDF:

  • ESP32
  • ESP32-S2, ESP32-S3
  • ESP32-C2, ESP32-C3, ESP32-C5, ESP32-C6, ESP32-C61
  • ESP32-H2
  • ESP32-P4

In order to program the ESP32 board using ESP-IDF, we recommend using VS Code IDE with the ESP-IDF extension and that’s what you are going to install on this guide.

Installing VS Code IDE

Follow the next instructions to install VS Code on your Operating System:

A) Installing VS Code on Windows (Visual Studio Code)

Go to code.visualstudio.com and download the stable build for your operating system (Windows).

Download VS Code for Windows

Click on the installation wizard to start the installation and follow all the steps to complete the installation. Accept the agreement and press the Next button.

Microsoft Visual Studio Code VS Code Installation wizard

Select the following options and click Next.

Microsoft Visual Studio Code VS Code Installation wizard step 2

Press the Install button.

Microsoft Visual Studio Code VS Code Installation wizard step 3

Finally, click Finish to finish the installation.

Microsoft Visual Studio Code VS Code Installation wizard final step

Open VS Code, and you’ll be greeted by a Welcome tab with the released notes of the newest version.

VS Code Welcome Screen

That’s it. Visual Studio Code was successfully installed.

B) Installing VS Code on Mac OS X (Visual Studio Code)

Go to code.visualstudio.com and download the stable build for your operating system (Mac OS X).

Microsoft Visual Studio Code VS Code Download Page for Mac OS X

After downloading the Visual Studio Code application file, you’ll be prompted with the following message. Press the “Open” button.

Microsoft Visual Studio Code VS Code Downloading application file for Mac OS X

Or open your Downloads folder and open Visual Studio Code.

Microsoft Visual Studio Code VS Code Downloading application file for Mac OS X

After that, you’ll be greeted by a Welcome tab with the released notes of the newest version.

Microsoft Visual Studio Code VS Code Installation wizard welcome screen on Max OS X

That’s it. Visual Studio Code was successfully installed.

C) Installing VS Code on Linux Ubuntu (Visual Studio Code)

Go to code.visualstudio.com and download the stable build for your operating system (Linux Ubuntu).

Microsoft Visual Studio Code VS Code Download Page for Linux Ubuntu

Save the installation file:

Microsoft Visual Studio Code VS Code Save installation file for Linux Ubuntu

To install it, open a Terminal window, navigate to your Downloads folder and run the following command to install VS Code.

$ cd Downloads
~/Downloads $ sudo apt install ./code_1.49.1-1600299189_amd64.deb

When the installation is finished, VS Code should be available in your applications menu.

Microsoft Visual Studio Code VS Code Open application Linux Ubuntu

Open VS Code, and you’ll be greeted by a Welcome tab with the released notes of the newest version.

Microsoft Visual Studio Code VS Code Installation wizard welcome screen on Linux Ubuntu

That’s it. Visual Studio Code was successfully installed.

Installing Python

To program the ESP32 with ESP-IDF, you need Python 3.5 or a later version installed on your computer. Follow the instructions according to your operating system:

A) Installing Python on Windows

Go to python.org/downloads and download Python 3.13.3 or a later version.

Download Python for Windows

Open the downloaded file to start the Python installation wizard. The following windows show up.

Important: make sure you check the option Add Python to PATH. Then, you can click on the Install Now button. You may also need to check the “Use admin privileges when installing py.exe”.

add python to path - installation

If the installation is successful, you’ll get the following message.

Python installation successful

Finally, click the Close button.

B) Installing Python on Mac OS X

Open a Terminal window. You can open it through Spotlight Search. To launch Spotlight, click the small magnifying glass icon in your menu bar (or press Cmd+Space).

MacOS spotlight

Then, type “terminal” and click on the Terminal icon to launch it.

Mac OS Launch terminal

To install Python, I’ll be using Homebrew.  If you don’t have the brew command available, type the next command in the Terminal window:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

Here’s how it looks on the Terminal window:

Then, run the brew command to install Python 3.13:

brew install python3

Here’s how it looks on the Terminal window:

Microsoft Visual Studio Code VS Code installing Python 3 with brew command

C) Installing Python on Linux Ubuntu

To program the ESP32 boards with ESP-IDF, you need Python 3.5 or a later version installed on your computer.

Open the Terminal window and check that you already have Python 3 installed. Run the following command:

python3 --version

It should return the current installed version:

python 3.13.3

If you don’t have Python installed, run the next command to install it:

sudo apt install python3

Whether you already have Python installed or not, you need to run the following command to install Python utilities.

sudo apt install python3-distutils
Installing python3-distutils Linux Ubuntu for PlatformIO IDE

Installing the ESP-IDF Extension for VS Code

To access the ESP-IDF tools, you need to install the official ESP-IDF extension on VS Code. Open VS Code and click the Extensions icon in the left sidebar or click Ctrl+Shift+X to open the Extensions tab.

Search for “ESP-IDF“, select the ESP-IDF by Espressif Systems and click the Install button.

Installing ESP-IDF Extension VS Code

Press the “Trust Publisher & Install” button. The installation will take some time to complete.

Installing ESP-IDF Extension VS Code Trust Espressif Systems

That’s it! The ESP-IDF extension by Espressif Systems is now installed in your IDE, the following welcome screen should appear.

VS Code Preparing ESP-IDF Installation

Next, follow these instructions to configure the ESP-IDF Extension:

  1. Open the ESP-IDF Espressif extension panel
  2. Expand the “Advanced” menu
  3. Click the “Configure ESP-IDF Extension” option
  4. Choose the “EXPRESS” setup mode to configure the ESP-IDF Tools
VS Code Configure ESP-IDF Extension Express Option

During the ESP-IDF Express Setup screen, you’ll be prompted to select the ESP-IDF version. At the time of writing this guide, the latest released version is v5.4.1. We recommend using version 5.X to follow along. Press the “Install” button.

Note: you can leave all other default options or change the ESP-IDF directory if you need to.

VS Code Configure ESP-IDF Extension Express Select Release Version and Install

That’s it, you’ll see a similar screen while the ESP-IDF extension is being configured. Wait a few minutes until this process is completed.

VS Code Configuring ESP-IDF Extension Express Select Release Version Completing Installation ESP IDF Tools Python Virtual Environment

Installing the C/C++ Extensions for VS Code (optional)

This step is optional, but since you’ll be using the C++ language with the ESP-IDF framework to program the ESP32 boards, we recommend installing these C/C++ extensions for VS Code. Open VS Code and click on the Extensions icon to open the Extensions tab.

Search for “C/C++“, select the first option and click the Install button.

Installing C and C plus plus VS Code

You can also install the “C/C++ Extension Pack“.

Installing C and C plus plus VS Code Extension Pack

Programming ESP32 with ESP-IDF using VS Code

That’s it, your ESP-IDF extension has been installed. You can get started programming your ESP32 boards with your first Blink project by following our guide ESP-IDF: ESP32 Blink LED Example.

ESP-IDF Extension Installation Completed VS Code ESP32

Wrapping Up

In this tutorial, you learned how to install the ESP-IDF extension on VS Code. You can now program your ESP32 board using ESP-IDF.

Here are some ESP-IDF tutorials that you may find helpful:

You can check our ESP32 resources (with Arduino IDE) to learn more about the ESP32 board:

Thanks for reading.



Learn how to build a home automation system and we’ll cover the following main subjects: Node-RED, Node-RED Dashboard, Raspberry Pi, ESP32, ESP8266, MQTT, and InfluxDB database DOWNLOAD »
Learn how to build a home automation system and we’ll cover the following main subjects: Node-RED, Node-RED Dashboard, Raspberry Pi, ESP32, ESP8266, MQTT, and InfluxDB database DOWNLOAD »

Enjoyed this project? Stay updated by subscribing our newsletter!

6 thoughts on “Install ESP-IDF Extension for ESP32 on VS Code (Windows, Mac OS X, Linux)”

  1. Trouble finding the ESP-IDF Extension in Visual Studio.
    When I type in ESP-IDF in Visual Studio, it comes up with nothing (it just displays ‘Loading’). If I backspace until only ESP is being searched for, it does find the Arduino IDE for Visual Studio 2022, which is a trial only version from Visual Micro and not the one from Espressif.
    Visual Studio is the standard Community 64n bit version 17.14.2.
    Any help would be gratefully received.

    Reply
    • Hi.

      It is not necessary to make any extra steps for the plugin to show up.
      It is in the extensions repository.

      Are you using Visual Studio instead of Visual Studio Code?
      You need Visual Studio Code which is different from Visual Studio.

      Visual Studio Code is free.

      Regards,
      Sara

      Reply
      • I am am using Visual Studio (Community Edition) which is also free, and I need to use that for other projects I am involved in. Is it possible to run the two options on the same computer? By that I mean if i download and install Visual Studio Code will it interfere with Visual Studio and vice versa?

        Reply

Leave a Comment

Download Our Free eBooks and Resources

Get instant access to our FREE eBooks, Resources, and Exclusive Electronics Projects by entering your email address below.