EDP-IDF isn't using the right path for running the export.ps1 script (VSC-1588) #1424
Open
1 task done
Labels
bug-report
Bug Report from users on Github (don't use this tag manually, its supposed to be used via the issue)
OS
Windows
Operating System version
Windows 11
Visual Studio Code version
1.97.0
ESP-IDF version
5.4
Python version
idf-python 3.11.2
Doctor command output
---------------------------------------------- ESP-IDF Extension for Visual Studio Code report ---------------------------------------------
OS win32 x64 10.0.22631
System environment variable IDF_PYTHON_ENV_PATH
undefined
System environment variable PATH
C:\Python313\Scripts;C:\Python313;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\dotnet;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files\Docker\Docker\resources\bin;C:\Program Files\Git\cmd;C:\Program Files\nodejs;C:\ProgramData\chocolatey\bin;C:\Program Files\usbipd-win;C:\Program Files\Microsoft VS Code\bin;C:\AppData\Local\Programs\Python\Python312\Scripts;C:\AppData\Local\Programs\Python\Python312;C:\AppData\Local\Microsoft\WindowsApps;C:\AppData\Roaming\npm;C:\AppData\Local\GitHubDesktop\bin
System environment variable PYTHON
undefined
Visual Studio Code version 1.97.0
Visual Studio Code language en
Visual Studio Code shell C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe
ESP-IDF Extension version 1.9.0
Workspace folder c:\Development\Examples\ESP\hello_world
---------------------------------------------------- Extension configuration settings ------------------------------------------------------
ESP-ADF Path (idf.espAdfPath) ${env:ADF_PATH}
ESP-IDF Path (idf.espIdfPath) C:\Development\Tools\esp\v5.4\esp-idf
ESP-MDF Path (idf.espMdfPath) ${env:MDF_PATH}
ESP-Matter Path (idf.espMatterPath) ${env:ESP_MATTER_PATH}
ESP-HomeKit-SDK Path (idf.espHomeKitSdkPath) ${env:HOMEKIT_PATH}
Custom extra paths C:\Development\Tools.espressif\tools\xtensa-esp-elf-gdb\14.2_20240403\xtensa-esp-elf-gdb\bin;C:\Development\Tools.espressif\tools\riscv32-esp-elf-gdb\14.2_20240403\riscv32-esp-elf-gdb\bin;C:\Development\Tools.espressif\tools\xtensa-esp-elf\esp-14.2.0_20241119\xtensa-esp-elf\bin;C:\Development\Tools.espressif\tools\riscv32-esp-elf\esp-14.2.0_20241119\riscv32-esp-elf\bin;C:\Development\Tools.espressif\tools\esp32ulp-elf\2.38_20240113\esp32ulp-elf\bin;C:\Development\Tools.espressif\tools\cmake\3.30.2\bin;C:\Development\Tools.espressif\tools\openocd-esp32\v0.12.0-esp32-20241016\openocd-esp32\bin;C:\Development\Tools.espressif\tools\ninja\1.12.1;C:\Development\Tools.espressif\tools\idf-exe\1.0.3;C:\Development\Tools.espressif\tools\ccache\4.10.2\ccache-4.10.2-windows-x86_64;C:\Development\Tools.espressif\tools\dfu-util\0.11\dfu-util-0.11-win64;C:\Development\Tools.espressif\tools\esp-rom-elfs\20241011
ESP-IDF extra vars
OPENOCD_SCRIPTS: C:\Development\Tools.espressif\tools\openocd-esp32\v0.12.0-esp32-20241016\openocd-esp32\share\openocd\scripts
IDF_CCACHE_ENABLE: 1
ESP_ROM_ELF_DIR: C:\Development\Tools.espressif\tools\esp-rom-elfs\20241011
IDF_PYTHON_ENV_PATH: C:\Development\Tools.espressif\python_env\idf5.4_py3.11_env
ESP_IDF_VERSION: 5.4
PATH: C:\Development\Tools.espressif\tools\xtensa-esp-elf-gdb\14.2_20240403\xtensa-esp-elf-gdb\bin;C:\Development\Tools.espressif\tools\riscv32-esp-elf-gdb\14.2_20240403\riscv32-esp-elf-gdb\bin;C:\Development\Tools.espressif\tools\xtensa-esp-elf\esp-14.2.0_20241119\xtensa-esp-elf\bin;C:\Development\Tools.espressif\tools\riscv32-esp-elf\esp-14.2.0_20241119\riscv32-esp-elf\bin;C:\Development\Tools.espressif\tools\esp32ulp-elf\2.38_20240113\esp32ulp-elf\bin;C:\Development\Tools.espressif\tools\cmake\3.30.2\bin;C:\Development\Tools.espressif\tools\openocd-esp32\v0.12.0-esp32-20241016\openocd-esp32\bin;C:\Development\Tools.espressif\tools\ninja\1.12.1;C:\Development\Tools.espressif\tools\idf-exe\1.0.3;C:\Development\Tools.espressif\tools\ccache\4.10.2\ccache-4.10.2-windows-x86_64;C:\Development\Tools.espressif\tools\dfu-util\0.11\dfu-util-0.11-win64;C:\Development\Tools.espressif\python_env\idf5.4_py3.11_env\Scripts;C:\Development\Tools\esp\v5.4\esp-idf\tools;%PATH%
IDF_DEACTIVATE_FILE_PATH: C:\Users\AFTABN~1\AppData\Local\Temp\tmp44or9wa8idf_32648
User extra vars (idf.customExtraVars)
System python Path (idf.pythonInstallPath) C:\Development\Tools.espressif\tools\idf-python\3.11.2\python.exe
Virtual environment Python path (computed) C:\Development\Tools.espressif\python_env\idf5.4_py3.11_env\Scripts\python.exe
Serial port (idf.port) COM8
OpenOCD Configs (idf.openOcdConfigs) interface/ftdi/esp32_devkitj_v1.cfg,board/esp32-wrover.cfg
ESP-IDF Tools Path (idf.toolsPath) C:\Development\Tools.espressif
Git Path (idf.gitPath) C:\Development\Tools.espressif\tools\idf-git\2.39.2\cmd\git.exe
Notification Mode (idf.notificationMode) All
-------------------------------------------------------- Configurations access -------------------------------------------------------------
Access to ESP-ADF Path (idf.espAdfPath) false
Access to ESP-IDF Path (idf.espIdfPath) true
Access to ESP-MDF Path (idf.espMdfPath) false
Access to ESP-Matter Path (idf.espMatterPath) false
Access to ESP-HomeKit Path (idf.espHomeKitSdkPath) false
Access to ESP-IDF Custom extra paths
Access to C:\Development\Tools.espressif\tools\xtensa-esp-elf-gdb\14.2_20240403\xtensa-esp-elf-gdb\bin: true
Access to C:\Development\Tools.espressif\tools\riscv32-esp-elf-gdb\14.2_20240403\riscv32-esp-elf-gdb\bin: true
Access to C:\Development\Tools.espressif\tools\xtensa-esp-elf\esp-14.2.0_20241119\xtensa-esp-elf\bin: true
Access to C:\Development\Tools.espressif\tools\riscv32-esp-elf\esp-14.2.0_20241119\riscv32-esp-elf\bin: true
Access to C:\Development\Tools.espressif\tools\esp32ulp-elf\2.38_20240113\esp32ulp-elf\bin: true
Access to C:\Development\Tools.espressif\tools\cmake\3.30.2\bin: true
Access to C:\Development\Tools.espressif\tools\openocd-esp32\v0.12.0-esp32-20241016\openocd-esp32\bin: true
Access to C:\Development\Tools.espressif\tools\ninja\1.12.1: true
Access to C:\Development\Tools.espressif\tools\idf-exe\1.0.3: true
Access to C:\Development\Tools.espressif\tools\ccache\4.10.2\ccache-4.10.2-windows-x86_64: true
Access to C:\Development\Tools.espressif\tools\dfu-util\0.11\dfu-util-0.11-win64: true
Access to C:\Development\Tools.espressif\tools\esp-rom-elfs\20241011: true
Access to System python Path (idf.pythonInstallPath) true
Access to Virtual environment Python path (computed) true
Access to CMake in environment PATH undefined
Access to Ninja in environment PATH undefined
Access to ESP-IDF Tools Path (idf.toolsPath) true
-------------------------------------------------------- Configurations has spaces -------------------------------------------------------------
Spaces in system environment Path true
Spaces in ESP-ADF Path (idf.espAdfPath) false
Spaces in ESP-IDF Path (idf.espIdfPath) false
Spaces in ESP-MDF Path (idf.espMdfPath) false
Spaces in ESP-Matter Path (idf.espMatterPath) false
Spaces in ESP-HomeKit-SDK Path (idf.espHomeKitSdkPath) false
Spaces in ESP-IDF Custom extra paths
Spaces in C:\Development\Tools.espressif\tools\xtensa-esp-elf-gdb\14.2_20240403\xtensa-esp-elf-gdb\bin: false
Spaces in C:\Development\Tools.espressif\tools\riscv32-esp-elf-gdb\14.2_20240403\riscv32-esp-elf-gdb\bin: false
Spaces in C:\Development\Tools.espressif\tools\xtensa-esp-elf\esp-14.2.0_20241119\xtensa-esp-elf\bin: false
Spaces in C:\Development\Tools.espressif\tools\riscv32-esp-elf\esp-14.2.0_20241119\riscv32-esp-elf\bin: false
Spaces in C:\Development\Tools.espressif\tools\esp32ulp-elf\2.38_20240113\esp32ulp-elf\bin: false
Spaces in C:\Development\Tools.espressif\tools\cmake\3.30.2\bin: false
Spaces in C:\Development\Tools.espressif\tools\openocd-esp32\v0.12.0-esp32-20241016\openocd-esp32\bin: false
Spaces in C:\Development\Tools.espressif\tools\ninja\1.12.1: false
Spaces in C:\Development\Tools.espressif\tools\idf-exe\1.0.3: false
Spaces in C:\Development\Tools.espressif\tools\ccache\4.10.2\ccache-4.10.2-windows-x86_64: false
Spaces in C:\Development\Tools.espressif\tools\dfu-util\0.11\dfu-util-0.11-win64: false
Spaces in C:\Development\Tools.espressif\tools\esp-rom-elfs\20241011: false
Spaces in System python Path (idf.pythonInstallPath) false
Spaces in Virtual environment Python path (computed) false
Spaces in ESP-IDF Tools Path (idf.toolsPath) false
----------------------------------------------------------- Executables Versions -----------------------------------------------------------
Git version 2.39.2.windows.1
ESP-IDF version 5.4.0
Python version 3.11.2
Python's pip version 25.0
-------------------------------------------------- Project configuration settings ----------------------------------------------------------
-------------------------------------------------- Python packages in Virtual environment Python path (computed) ---------------------------
annotated-types version: 0.7.0
bitarray version: 3.0.0
bitstring version: 4.3.0
certifi version: 2025.1.31
cffi version: 1.17.1
charset-normalizer version: 3.4.1
click version: 8.1.8
colorama version: 0.4.6
construct version: 2.10.70
cryptography version: 43.0.3
ecdsa version: 0.19.0
esp-coredump version: 1.13.1
esp-idf-kconfig version: 2.4.1
esp-idf-monitor version: 1.5.0
esp_idf_nvs_partition_gen version: 0.1.7
esp-idf-panic-decoder version: 1.2.1
esp-idf-size version: 1.6.1
esptool version: 4.8.1
freertos-gdb version: 1.0.4
idf-component-manager version: 2.1.2
idna version: 3.10
intelhex version: 2.3.0
jsonref version: 1.1.0
markdown-it-py version: 3.0.0
mdurl version: 0.1.2
packaging version: 24.2
pip version: 25.0
psutil version: 6.1.1
pyclang version: 0.6.0
pycparser version: 2.22
pydantic version: 2.10.6
pydantic_core version: 2.27.2
pydantic-settings version: 2.7.1
pyelftools version: 0.31
pygdbmi version: 0.11.0.0
Pygments version: 2.19.1
pyparsing version: 3.2.1
pyserial version: 3.5
python-dotenv version: 1.0.1
PyYAML version: 6.0.2
reedsolo version: 1.7.0
requests version: 2.32.3
requests-file version: 2.1.0
requests-toolbelt version: 1.0.0
rich version: 13.9.4
ruamel.yaml version: 0.18.10
ruamel.yaml.clib version: 0.2.12
setuptools version: 71.0.0
six version: 1.17.0
tqdm version: 4.67.1
typing_extensions version: 4.12.2
urllib3 version: 1.26.20
windows-curses version: 2.4.1
---------------------------------------------------- Check ESP-IDF python requirements.txt -------------------------------------------------
Check ESP-IDF Python packages Python requirements are satisfied.
---------------------------------------------------- Check ESP-IDF debug adapter requirements.txt ------------------------------------------
Check Debug AdapterPython packages Error
---------------------------------------------------- Visual Studio Code launch.json --------------------------------------------------------
{
"version": "0.2.0",
"configurations": [
{
"type": "gdbtarget",
"request": "attach",
"name": "Eclipse CDT GDB Adapter"
},
{
"type": "espidf",
"name": "Launch",
"request": "launch"
}
]
}
---------------------------------------------------- Visual Studio Code c_cpp_properties.json ----------------------------------------------
{
"configurations": [
{
"name": "ESP-IDF",
"compilerPath": "${config:idf.toolsPathWin}\tools\xtensa-esp-elf\esp-14.2.0_20241119\xtensa-esp-elf\bin\xtensa-esp32-elf-gcc.exe",
"compileCommands": "${config:idf.buildPath}/compile_commands.json",
"includePath": [
"${config:idf.espIdfPath}/components/",
"${config:idf.espIdfPathWin}/components/",
"${workspaceFolder}/**"
],
"browse": {
"path": [
"${config:idf.espIdfPath}/components",
"${config:idf.espIdfPathWin}/components",
"${workspaceFolder}"
],
"limitSymbolsToIncludedHeaders": true
}
}
],
"version": 4
}
----------------------------------------------------------- Latest error -----------------------------------------------------------------
{
"code": 1,
"killed": false,
"signal": null,
"cmd": "C:\Development\Tools\.espressif\python_env\idf5.4_py3.11_env\Scripts\python.exe C:\Development\Tools\esp\v5.4\esp-idf\tools\check_python_dependencies.py -r c:\.vscode\extensions\espressif.esp-idf-extension-1.9.0\esp_debug_adapter\requirements.txt"
}
----------------------------------------------------------- Logfile -----------------------------------------------------------------
Extension
esp_idf_vsc_ext.log
Description
This is a fresh install of VS Code and the ESP-IDF extension, with the
esp
and.espressif
folders installed inC:\Development\Tools
, since my user name contains a space (replaced it withUser Name
in the output above and below).After installing and creating a new project based on the
hello_world
example, I noticed that running the ESP-IDF terminal shortcut somehow looks at the wrong path. The shortcut creates a new PS terminal and then tries to run theexport.ps1
script located in the.vscode
espressif extension folder (C:\Users\User Name\.vscode\extensions\espressif.esp-idf-extension-1.9.0
) instead of the esp-idf folder (C:\Development\Tools\esp\v5.4\esp-idf
).Because of the space, it results in the script not being run. Building and flashing etc. still seem to work without issues, but I was hoping to get this understand why this command is looking at the extension folder for the export file when the extension has been configured with the other C: paths above. Have I missed setting the IDF_PATH variables in other places outside of the base installation?
I also noticed that in the
.vscode
c_cpp_properties.json file
, I was getting "Problems" reported due to"${config:idf.espIdfPath}/components/**",
not being found. After checking,idf.espIdfPath
was set to$env:IDF_PATH
in thesettings.json
within vscode but I manually replaced this with the same as theidf.espIdfPathWin
which wasC:\Development\Tools\esp\v5.4\esp-idf
. That resolved the problem for the components line not being found, but hasn't resolved the export script issue.Debug Message
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows
PS C:\Development\Examples\ESP\hello_world> c:\Users\User Name.vscode\extensions\espressif.esp-idf-extension-1.9.0\export.ps1
c:\Users\User: The term 'c:\Users\User' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
PS C:\Development\Examples\ESP\hello_world>
Other Steps to Reproduce
I've tried cleanly removing vscode including any remaining artifact files and configs, as well as deleting the esp-idf folders to have them be reinstalled by the extension. I still encounter the issue with the fresh install.
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: