Page 1 of 1

Issue with VSCode extension

Posted: Fri Sep 05, 2025 7:29 pm
by sidprice
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.

Re: Issue with VSCode extension

Posted: Fri Oct 10, 2025 9:29 am
by radurentea
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.