Issue with VSCode extension

sidprice
Posts: 18
Joined: Sat Jan 09, 2021 10:20 pm

Issue with VSCode extension

Postby sidprice » Fri Sep 05, 2025 7:29 pm

Hello, I am using the ESP-IDF extension in VSCode, all seems to be working well. However, I have one issue, I am using Windows PowerShell, and I am unable to execute the "idf.py" command. The ESP-IDF terminal inside VSCode works fine, I do need to use "idf.py" outside of VSCode. Help would be much appreciated.

radurentea
Espressif staff
Espressif staff
Posts: 26
Joined: Thu Mar 09, 2023 8:30 am

Re: Issue with VSCode extension

Postby radurentea » Fri Oct 10, 2025 9:29 am

Hi sidprice,

Sorry for late reply.

VS Code extension is actually setting up its own Python virtual environment and environment variables only inside VSCode’s ESP-IDF Terminal.

If you want to use Powershell outside of the VS Code extension, you need to replicate the environment. To do that:
- you need to find where the esp-idf was installed (Inside ESP-IDF Terminal you can run the command "echo $env:IDF_PATH")
- Open a terminal in the location of the esp-idf folder
- Run the command ".\export.ps1" inside that terminal (the command runs the "export.ps1 script that sets all necessary environment variables in your PowerShell session, meaning that you will have to do this everytime you want to use PowerShell outside of the ESP-IDF VS Code extension's environment)

You can check that the command worked running the command "idf.py --version".

Let me know if you have any other questions.

Who is online

Users browsing this forum: No registered users and 2 guests