ESP debug adapter question
Posted: Thu Dec 02, 2021 12:58 am
I keep trying to successfully configure and run the debugger.
So far I was trying to use the C/C++ extension in launch.json ("cppdbg"), but after many unsuccessful attempts I would like to try the Debug Adapter approach ("espidf").
I run the "Doctor Command" and got the output attached below. It tells me that the Debug Adapter python requirements are not satisfied and it also points me to a command which is supposed to fix it.
I just want to ask you if running this command may affect other esp-idf modules and prevent them from working correctly (as they do now) and if you can see anything else in this log that may prevent the Debug Adapter from working correctly?
Thanks a lot.
"Doctor Command" output:
So far I was trying to use the C/C++ extension in launch.json ("cppdbg"), but after many unsuccessful attempts I would like to try the Debug Adapter approach ("espidf").
I run the "Doctor Command" and got the output attached below. It tells me that the Debug Adapter python requirements are not satisfied and it also points me to a command which is supposed to fix it.
I just want to ask you if running this command may affect other esp-idf modules and prevent them from working correctly (as they do now) and if you can see anything else in this log that may prevent the Debug Adapter from working correctly?
Thanks a lot.
"Doctor Command" output:
---------------------------------------------- ESP-IDF Extension for Visual Studio Code report ---------------------------------------------
OS win32 x64 10.0.17763
System environment variable IDF_PYTHON_ENV_PATH undefined
System environment variable PATH
C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\;
C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS\;
C:\Windows\system32;
C:\Windows;
C:\Windows\System32\Wbem;
C:\Windows\System32\WindowsPowerShell\v1.0\;
C:\Windows\System32\OpenSSH\;
C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;
C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;
J:\Mfgsys\System;
C:\Program Files\PuTTY\;
C:\Program Files\dotnet\;
C:\Program Files\Git\cmd;C:\ProgramFiles(x86)\GitExtensions\;
C:\ESP-IDF\TOOLS\.espressif\python_env\idf4.1_py3.9_env\Scripts;
C:\ESP-IDF\TOOLS\.espressif\tools\idf-exe\1.0.1\;
C:\ESP-IDF\TOOLS\.espressif\tools\openocd-esp32\v0.10.0-esp32-20211111\openocd-esp32\bin;
C:\Users\ndjur\AppData\Local\Microsoft\WindowsApps;
C:\Users\ndjur\AppData\Local\Programs\Microsoft VS Code\bin;
C:\ESP-IDF\TOOLS\.espressif\tools\xtensa-esp32-elf\esp-2020r2-8.2.0\xtensa-esp32-elf\bin;
C:\ESP-IDF\TOOLS\.espressif\tools\xtensa-esp32s2-elf\esp-2020r2-8.2.0\xtensa-esp32s2-elf\bin;
C:\ESP-IDF\TOOLS\.espressif\tools\esp32ulp-elf\2.28.51-esp-20191205\esp32ulp-elf-binutils\bin;
C:\ESP-IDF\TOOLS\.espressif\tools\esp32s2ulp-elf\2.28.51-esp-20191205\esp32s2ulp-elf-binutils\bin;
C:\ESP-IDF\TOOLS\.espressif\tools\cmake\3.13.4\bin;
C:\ESP-IDF\TOOLS\.espressif\tools\ninja\1.9.0\;
C:\ESP-IDF\TOOLS\.espressif\tools\ccache\3.7\;
C:\ESP-IDF\IDF\tools;
C:\Users\ndjur\AppData\Local\GitHubDesktop\bin;
System environment variable PYTHON undefined
Visual Studio Code version 1.62.3
Visual Studio Code language en
Visual Studio Code shell C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
ESP-IDF Extension version 1.2.0
---------------------------------------------------- Extension configuration settings ------------------------------------------------------
ESP-ADF Path (idf.espAdfPath) ${env:ADF_PATH}
ESP-IDF Path (idf.espIdfPath) c:\ESP-IDF\IDF
ESP-MDF Path (idf.espMdfPath) ${env:MDF_PATH}
Custom extra paths (idf.customExtraPaths)
C:\ESP-IDF\TOOLS\.espressif\tools\xtensa-esp32-elf\esp-2020r2-8.2.0\xtensa-esp32-elf\bin;
C:\ESP-IDF\TOOLS\.espressif\tools\xtensa-esp32s2-elf\esp-2020r2-8.2.0\xtensa-esp32s2-elf\bin;
C:\ESP-IDF\TOOLS\.espressif\tools\esp32ulp-elf\2.28.51-esp-20191205\esp32ulp-elf-binutils\bin;
C:\ESP-IDF\TOOLS\.espressif\tools\esp32s2ulp-elf\2.28.51-esp-20191205\esp32s2ulp-elf-binutils\bin;
C:\ESP-IDF\TOOLS\.espressif\tools\cmake\3.13.4\bin;
C:\ESP-IDF\TOOLS\.espressif\tools\openocd-esp32\v0.10.0-esp32-20211111\openocd-esp32\bin;
C:\ESP-IDF\TOOLS\.espressif\tools\ninja\1.9.0\;C:\ESP-IDF\TOOLS\.espressif\tools\idf-exe\1.0.1\;
C:\ESP-IDF\TOOLS\.espressif\tools\ccache\3.7\;C:\ESP-IDF\TOOLS\.espressif\python_env\idf4.1_py3.9_env\Scripts;
C:\ESP-IDF\IDF\tools
Custom extra vars (idf.customExtraVars) {"OPENOCD_SCRIPTS":"C:/ESP-IDF/TOOLS/.espressif/tools/openocd-esp32/v0.10.0-esp32-20211111/openocd-esp32/share/openocd/scripts"}
Virtual env Python Path (idf.pythonBinPath) C:\ESP-IDF\TOOLS\.espressif\python_env\idf4.1_py3.9_env\Scripts\python.exe
Serial port (idf.port) COM21
OpenOCD Configs (idf.openOcdConfigs) interface/ftdi/esp32_devkitj_v1.cfg,board/esp32-wrover.cfg
ESP-IDF Tools Path (idf.toolsPath) c:\ESP-IDF\TOOLS
Git Path (idf.gitPath) git
-------------------------------------------------------- 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-IDF Custom extra paths
Access to C:\ESP-IDF\TOOLS\.espressif\tools\xtensa-esp32-elf\esp-2020r2-8.2.0\xtensa-esp32-elf\bin: true
Access to C:\ESP-IDF\TOOLS\.espressif\tools\xtensa-esp32s2-elf\esp-2020r2-8.2.0\xtensa-esp32s2-elf\bin: true
Access to C:\ESP-IDF\TOOLS\.espressif\tools\esp32ulp-elf\2.28.51-esp-20191205\esp32ulp-elf-binutils\bin: true
Access to C:\ESP-IDF\TOOLS\.espressif\tools\esp32s2ulp-elf\2.28.51-esp-20191205\esp32s2ulp-elf-binutils\bin: true
Access to C:\ESP-IDF\TOOLS\.espressif\tools\cmake\3.13.4\bin: true
Access to C:\ESP-IDF\TOOLS\.espressif\tools\openocd-esp32\v0.10.0-esp32-20211111\openocd-esp32\bin: true
Access to C:\ESP-IDF\TOOLS\.espressif\tools\ninja\1.9.0\: true
Access to C:\ESP-IDF\TOOLS\.espressif\tools\idf-exe\1.0.1\: true
Access to C:\ESP-IDF\TOOLS\.espressif\tools\ccache\3.7\: true
Access to C:\ESP-IDF\TOOLS\.espressif\python_env\idf4.1_py3.9_env\Scripts: true
Access to C:\ESP-IDF\IDF\tools: true
Access to Virtual env Python Path (idf.pythonBinPath) true
Access to CMake in environment PATH undefined
Access to Ninja in environment PATH undefined
Access to ESP-IDF Tools Path (idf.toolsPath) true
----------------------------------------------------------- Executables Versions -----------------------------------------------------------
Git version 2.21.0.windows.1
ESP-IDF version 4.1
Python version 3.9.0
Python's pip version 20.2.4
-------------------------------------------------- Python packages in idf.pythonBinPath ----------------------------------------------------
certifi version: 2020.11.8
cffi version: 1.14.3
chardet version: 3.0.4
click version: 7.1.2
cryptography version: 3.2.1
esp-windows-curses version: 0.1
future version: 0.18.2
idna version: 2.10
pip version: 20.2.4
psutil version: 5.7.3
pycparser version: 2.20
pyelftools version: 0.27
pygdbmi version: 0.9.0.2
pyparsing version: 2.3.1
pyserial version: 3.4
requests version: 2.25.0
setuptools version: 50.3.2
six version: 1.15.0
typing version: 3.7.4.3
urllib3 version: 1.26.2
wheel version: 0.35.1
windows-curses version: 2.2.0
xmlrunner version: 1.7.7
---------------------------------------------------- Check ESP-IDF python requirements.txt -------------------------------------------------
Check ESP-IDF Python packages Python requirements from c:\ESP-IDF\IDF\requirements.txt are satisfied.
---------------------------------------------------- Check extension requirements.txt ------------------------------------------------------
Check Extension Python packages Error
---------------------------------------------------- Check ESP-IDF debug adapter requirements.txt ------------------------------------------
Check Debug AdapterPython packages Error
---------------------------------------------------- Visual Studio Code launch.json --------------------------------------------------------
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "EIM Debug",
"type": "cppdbg",
"request": "launch",
"cwd": "${workspaceFolder}/build",
"program": "${workspaceFolder}/build/EIMCtrl.elf",
"miDebuggerPath": "C:/ESP-IDF/TOOLS/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gdb.exe",
"externalConsole": true,
"logging": {
"engineLogging": true
},
"setupCommands": [
{ "text": "target remote localhost:3333" },
{ "text": "set remote hardware-watchpoint-limit 2" },
{ "text": "monitor reset halt" },
{ "text": "flushregs" }
]
}
]
}
---------------------------------------------------- Visual Studio Code c_cpp_properties.json ----------------------------------------------
{
"configurations": [
{
"name": "ESP-IDF",
// "compilerPath": "C:\\ESP-IDF\\Tools\\.espressif\\tools\\xtensa-esp32-elf\\esp-2020r3-8.4.0\\xtensa-esp32-elf\\bin\\xtensa-esp32-elf-gcc.exe",
"compilerPath": "C:\\ESP-IDF\\TOOLS\\.espressif\\tools\\xtensa-esp32-elf\\esp-2020r2-8.2.0\\xtensa-esp32-elf\\bin\\xtensa-esp32-elf-gcc.exe",
"cStandard": "c11",
"cppStandard": "c++17",
"includePath": [
"${config:idf.espIdfPath}/components/**",
"${config:idf.espIdfPathWin}/components/**",
"${config:idf.espAdfPath}/components/**",
"${config:idf.espAdfPathWin}/components/**",
"${workspaceFolder}/**",
"C:/ESP-IDF/IDF/components/bt/include"
],
"browse": {
"path": [
"${config:idf.espIdfPath}/components",
"${config:idf.espIdfPathWin}/components",
"${config:idf.espAdfPath}/components/**",
"${config:idf.espAdfPathWin}/components/**",
"${workspaceFolder}"
],
"limitSymbolsToIncludedHeaders": false
}
}
],
"version": 4
}
----------------------------------------------------------- Latest error -----------------------------------------------------------------
Latest error at Command failed: C:\ESP-IDF\TOOLS\.espressif\python_env\idf4.1_py3.9_env\Scripts\python.exe c:\ESP-IDF\IDF\tools\check_python_dependencies.py -r "c:\Users\ndjur\.vscode\extensions\espressif.esp-idf-extension-1.2.0\esp_debug_adapter\requirements.txt"
--------------------------------------------------------------------------------------------------------------------------------------------