Closed mukymuk closed 4 months ago
We are working on migrating to a new debug adapter that is more stable that our current python one in this PR:
https://github.com/espressif/vscode-esp-idf-extension/pull/1131
You are welcome to test it with the PR vsix installer if you like.
I tried the vsix and got an error during install the first attempt. Second attempt seemed to install, but nothing new showed up in the extensions list so I don't know if it's installed or not. Various debugging errors remain. JTAG Debugging seems so utterly broken in vscode and in eclipse that it's amazing to me that you can even get it to pass basic functional tests at all.
Did you tried the new launch.json configuration ? Maybe you are still using the old debug adapter if you don't update the launch.json content. Something like this. (was also updated in docs in the PR)
{
"configurations": [
{
"type": "gdbtarget",
"request": "attach",
"name": "Eclipse CDT Remote",
"program": "${workspaceFolder}/build/${command:espIdf.getProjectName}.elf",
"initCommands": [
"set remote hardware-watchpoint-limit 2",
"mon reset halt",
"maintenance flush register-cache",
"thb app_main",
],
"gdb": "${command:espIdf.getXtensaGdb}",
"target": {
"port": "3333"
},
}
]
}
That was the problem. Thanks! There's still some errors here and there, but I have basic debug functionality now.
This issue has been marked as stale
since there are no activities, and this will be closed in 5 days if there are no further activities
OS
Windows
Operating System version
Windows 10
Visual Studio Code version
1.87.2
ESP-IDF version
5.1.2
Python version
3.11.2
Doctor command output
---------------------------------------------- ESP-IDF Extension for Visual Studio Code report --------------------------------------------- OS win32 x64 10.0.19045 System environment variable IDF_PYTHON_ENV_PATH undefined System environment variable PATH C:\Program Files\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\MATLAB\R2023b\bin;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\System32\OpenSSH;C:\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files (x86)\Nmap
System environment variable PYTHON
undefined
Visual Studio Code version 1.87.2
Visual Studio Code language en
Visual Studio Code shell C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
ESP-IDF Extension version 1.7.0
Workspace folder c:\project\bh\asv\fw\asv\hello_world
---------------------------------------------------- Extension configuration settings ------------------------------------------------------
ESP-ADF Path (idf.espAdfPath) ${env:ADF_PATH}
ESP-IDF Path (idf.espIdfPath) C:\Espressif\frameworks\esp-idf-v5.1.2
ESP-MDF Path (idf.espMdfPath) ${env:MDF_PATH}
ESP-Matter Path (idf.espMatterPath) ${env:ESP_MATTER_PATH}
Custom extra paths (idf.customExtraPaths) C:\Espressif\tools\xtensa-esp-elf-gdb\12.1_20221002\xtensa-esp-elf-gdb\bin;C:\Espressif\tools\riscv32-esp-elf-gdb\12.1_20221002\riscv32-esp-elf-gdb\bin;C:\Espressif\tools\xtensa-esp32-elf\esp-12.2.0_20230208\xtensa-esp32-elf\bin;C:\Espressif\tools\xtensa-esp32s2-elf\esp-12.2.0_20230208\xtensa-esp32s2-elf\bin;C:\Espressif\tools\xtensa-esp32s3-elf\esp-12.2.0_20230208\xtensa-esp32s3-elf\bin;C:\Espressif\tools\riscv32-esp-elf\esp-12.2.0_20230208\riscv32-esp-elf\bin;C:\Espressif\tools\esp32ulp-elf\2.35_20220830\esp32ulp-elf\bin;C:\Espressif\tools\cmake\3.24.0\bin;C:\Espressif\tools\openocd-esp32\v0.12.0-esp32-20230921\openocd-esp32\bin;C:\Espressif\tools\ninja\1.10.2;C:\Espressif\tools\idf-exe\1.0.3;C:\Espressif\tools\ccache\4.8\ccache-4.8-windows-x86_64;C:\Espressif\tools\dfu-util\0.11\dfu-util-0.11-win64;C:\Espressif\tools\esp-rom-elfs\20230320
Custom extra vars (idf.customExtraVars)
OPENOCD_SCRIPTS: C:\Espressif\tools\openocd-esp32\v0.12.0-esp32-20230921/openocd-esp32/share/openocd/scripts
IDF_CCACHE_ENABLE: 1
ESP_ROM_ELF_DIR: C:\Espressif\tools\esp-rom-elfs\20230320/
Virtual env Python Path (idf.pythonBinPath) C:\Espressif\python_env\idf5.1_py3.11_env\Scripts\python.exe
Serial port (idf.port) COM1
OpenOCD Configs (idf.openOcdConfigs) board/esp32c2-ftdi.cfg
ESP-IDF Tools Path (idf.toolsPath) C:\Espressif
Git Path (idf.gitPath) C:\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-IDF Custom extra paths
Access to C:\Espressif\tools\xtensa-esp-elf-gdb\12.1_20221002\xtensa-esp-elf-gdb\bin: true
Access to C:\Espressif\tools\riscv32-esp-elf-gdb\12.1_20221002\riscv32-esp-elf-gdb\bin: true
Access to C:\Espressif\tools\xtensa-esp32-elf\esp-12.2.0_20230208\xtensa-esp32-elf\bin: true
Access to C:\Espressif\tools\xtensa-esp32s2-elf\esp-12.2.0_20230208\xtensa-esp32s2-elf\bin: true
Access to C:\Espressif\tools\xtensa-esp32s3-elf\esp-12.2.0_20230208\xtensa-esp32s3-elf\bin: true
Access to C:\Espressif\tools\riscv32-esp-elf\esp-12.2.0_20230208\riscv32-esp-elf\bin: true
Access to C:\Espressif\tools\esp32ulp-elf\2.35_20220830\esp32ulp-elf\bin: true
Access to C:\Espressif\tools\cmake\3.24.0\bin: true
Access to C:\Espressif\tools\openocd-esp32\v0.12.0-esp32-20230921\openocd-esp32\bin: true
Access to C:\Espressif\tools\ninja\1.10.2: true
Access to C:\Espressif\tools\idf-exe\1.0.3: true
Access to C:\Espressif\tools\ccache\4.8\ccache-4.8-windows-x86_64: true
Access to C:\Espressif\tools\dfu-util\0.11\dfu-util-0.11-win64: true
Access to C:\Espressif\tools\esp-rom-elfs\20230320: 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
-------------------------------------------------------- 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-IDF Custom extra paths
Spaces in C:\Espressif\tools\xtensa-esp-elf-gdb\12.1_20221002\xtensa-esp-elf-gdb\bin: false
Spaces in C:\Espressif\tools\riscv32-esp-elf-gdb\12.1_20221002\riscv32-esp-elf-gdb\bin: false
Spaces in C:\Espressif\tools\xtensa-esp32-elf\esp-12.2.0_20230208\xtensa-esp32-elf\bin: false
Spaces in C:\Espressif\tools\xtensa-esp32s2-elf\esp-12.2.0_20230208\xtensa-esp32s2-elf\bin: false
Spaces in C:\Espressif\tools\xtensa-esp32s3-elf\esp-12.2.0_20230208\xtensa-esp32s3-elf\bin: false
Spaces in C:\Espressif\tools\riscv32-esp-elf\esp-12.2.0_20230208\riscv32-esp-elf\bin: false
Spaces in C:\Espressif\tools\esp32ulp-elf\2.35_20220830\esp32ulp-elf\bin: false
Spaces in C:\Espressif\tools\cmake\3.24.0\bin: false
Spaces in C:\Espressif\tools\openocd-esp32\v0.12.0-esp32-20230921\openocd-esp32\bin: false
Spaces in C:\Espressif\tools\ninja\1.10.2: false
Spaces in C:\Espressif\tools\idf-exe\1.0.3: false
Spaces in C:\Espressif\tools\ccache\4.8\ccache-4.8-windows-x86_64: false
Spaces in C:\Espressif\tools\dfu-util\0.11\dfu-util-0.11-win64: false
Spaces in C:\Espressif\tools\esp-rom-elfs\20230320: false
Spaces in Virtual env Python Path (idf.pythonBinPath) false
Spaces in ESP-IDF Tools Path (idf.toolsPath) false
----------------------------------------------------------- Executables Versions -----------------------------------------------------------
Git version 2.39.2.windows.1
ESP-IDF version 5.1.2
Python version 3.11.2
Python's pip version 23.3.2
-------------------------------------------------- Project configuration settings ----------------------------------------------------------
-------------------------------------------------- Python packages in idf.pythonBinPath ----------------------------------------------------
bitarray version: 2.8.3
bitstring version: 4.1.3
CacheControl version: 0.13.1
certifi version: 2023.11.17
cffi version: 1.16.0
charset-normalizer version: 3.3.2
click version: 8.0.4
colorama version: 0.4.6
configparser version: 6.0.0
construct version: 2.10.69
contextlib2 version: 21.6.0
cryptography version: 39.0.2
ecdsa version: 0.18.0
esp-coredump version: 1.10.0
esp-debug-backend version: 1.0.3
esp-idf-kconfig version: 1.4.2
esp-idf-monitor version: 1.3.4
esp-idf-panic-decoder version: 1.0.1
esp-idf-size version: 1.0.3
esptool version: 4.7.0
filelock version: 3.13.1
freertos-gdb version: 1.0.2
future version: 0.18.2
gcovr version: 6.0
gdbfrontend version: 0.11.3
idf-component-manager version: 1.4.1
idna version: 3.6
intelhex version: 2.3.0
Jinja2 version: 3.0.3
kconfiglib version: 14.1.0
lxml version: 5.1.0
markdown-it-py version: 3.0.0
MarkupSafe version: 2.1.3
mdurl version: 0.1.2
msgpack version: 1.0.7
packaging version: 23.2
pip version: 23.3.2
pycparser version: 2.21
pycryptodome version: 3.15.0
pyelftools version: 0.29
pygdbmi version: 0.9.0.2
Pygments version: 2.17.2
pyparsing version: 3.0.9
pyserial version: 3.5
pywin32 version: 306
PyYAML version: 6.0.1
reedsolo version: 1.7.0
requests version: 2.31.0
requests-file version: 1.5.1
requests-toolbelt version: 1.0.0
rich version: 13.7.0
schema version: 0.7.5
setuptools version: 69.0.3
six version: 1.16.0
tqdm version: 4.66.1
urllib3 version: 1.26.18
websocket-client version: 1.7.0
windows-curses version: 2.3.2
xlrd version: 2.0.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 Python requirements are satisfied.
---------------------------------------------------- Visual Studio Code launch.json --------------------------------------------------------
{
"version": "0.2.0",
"configurations": [
{
"type": "espidf",
"name": "Launch",
"request": "launch"
}
]
}
---------------------------------------------------- Visual Studio Code c_cpp_properties.json ----------------------------------------------
{
"configurations": [
{
"name": "ESP-IDF",
"compilerPath": "${config:idf.toolsPathWin}\tools\riscv32-esp-elf\esp-12.2.0_20230208\riscv32-esp-elf\bin\riscv32-esp-elf-gcc.exe",
"compileCommands": "${workspaceFolder}/build/compile_commands.json",
"includePath": [
"${config:idf.espIdfPath}/components/",
"${config:idf.espIdfPathWin}/components/",
"${config:idf.espAdfPath}/components/",
"${config:idf.espAdfPathWin}/components/",
"${workspaceFolder}/"
],
"browse": {
"path": [
"${config:idf.espIdfPath}/components",
"${config:idf.espIdfPathWin}/components",
"${config:idf.espAdfPath}/components/",
"${config:idf.espAdfPathWin}/components/**",
"${workspaceFolder}"
],
"limitSymbolsToIncludedHeaders": false
}
}
],
"version": 4
}
Extension
esp_idf_vsc_ext.log
Description
Flashing hello_world via Jtag works. Hit F5 and debug break at app_main(). F10 and it errors out.
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide