Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QEMU Debug & Monitor Error on Windows (VSC-1624) #1473

Closed
1 task done
JohannesKaranitsch opened this issue Mar 13, 2025 · 2 comments · Fixed by #1462
Closed
1 task done

QEMU Debug & Monitor Error on Windows (VSC-1624) #1473

JohannesKaranitsch opened this issue Mar 13, 2025 · 2 comments · Fixed by #1462
Assignees
Labels
bug-report Bug Report from users on Github (don't use this tag manually, its supposed to be used via the issue)

Comments

@JohannesKaranitsch
Copy link

OS

Windows

Operating System version

Windows 11

Visual Studio Code version

1.98.1

ESP-IDF version

5.3.2

Python version

3.11.2

Doctor command output

---------------------------------------------- ESP-IDF Extension for Visual Studio Code report ---------------------------------------------
OS win32 x64 10.0.26100
System environment variable IDF_PYTHON_ENV_PATH
undefined
System environment variable PATH
C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\PuTTY;C:\AppData\Local\Microsoft\WindowsApps;
System environment variable PYTHON
undefined
Visual Studio Code version 1.98.1
Visual Studio Code language en
Visual Studio Code shell C:\AppData\Local\Microsoft\WindowsApps\Microsoft.PowerShell_8wekyb3d8bbwe\pwsh.exe
ESP-IDF Extension version 1.9.1
Workspace folder c:\esp\projects\WebConfig
---------------------------------------------------- Extension configuration settings ------------------------------------------------------
ESP-ADF Path (idf.espAdfPath) ${env:ADF_PATH}
ESP-IDF Path (idf.espIdfPath) C:\esp\v5.3.2\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:\esp.espressif\tools\xtensa-esp-elf-gdb\14.2_20240403\xtensa-esp-elf-gdb\bin;C:\esp.espressif\tools\riscv32-esp-elf-gdb\14.2_20240403\riscv32-esp-elf-gdb\bin;C:\esp.espressif\tools\xtensa-esp-elf\esp-13.2.0_20240530\xtensa-esp-elf\bin;C:\esp.espressif\tools\riscv32-esp-elf\esp-13.2.0_20240530\riscv32-esp-elf\bin;C:\esp.espressif\tools\esp32ulp-elf\2.38_20240113\esp32ulp-elf\bin;C:\esp.espressif\tools\cmake\3.30.2\bin;C:\esp.espressif\tools\openocd-esp32\v0.12.0-esp32-20241016\openocd-esp32\bin;C:\esp.espressif\tools\ninja\1.12.1;C:\esp.espressif\tools\idf-exe\1.0.3;C:\esp.espressif\tools\ccache\4.10.2\ccache-4.10.2-windows-x86_64;C:\esp.espressif\tools\dfu-util\0.11\dfu-util-0.11-win64;C:\esp.espressif\tools\esp-rom-elfs\20240305
ESP-IDF extra vars
OPENOCD_SCRIPTS: C:\esp.espressif\tools\openocd-esp32\v0.12.0-esp32-20241016\openocd-esp32\share\openocd\scripts
IDF_CCACHE_ENABLE: 1
ESP_ROM_ELF_DIR: C:\esp.espressif\tools\esp-rom-elfs\20240305
IDF_PYTHON_ENV_PATH: C:\esp.espressif\python_env\idf5.3_py3.11_env
ESP_IDF_VERSION: 5.3
PATH: C:\esp.espressif\tools\xtensa-esp-elf-gdb\14.2_20240403\xtensa-esp-elf-gdb\bin;C:\esp.espressif\tools\riscv32-esp-elf-gdb\14.2_20240403\riscv32-esp-elf-gdb\bin;C:\esp.espressif\tools\xtensa-esp-elf\esp-13.2.0_20240530\xtensa-esp-elf\bin;C:\esp.espressif\tools\riscv32-esp-elf\esp-13.2.0_20240530\riscv32-esp-elf\bin;C:\esp.espressif\tools\esp32ulp-elf\2.38_20240113\esp32ulp-elf\bin;C:\esp.espressif\tools\cmake\3.30.2\bin;C:\esp.espressif\tools\openocd-esp32\v0.12.0-esp32-20241016\openocd-esp32\bin;C:\esp.espressif\tools\ninja\1.12.1;C:\esp.espressif\tools\idf-exe\1.0.3;C:\esp.espressif\tools\ccache\4.10.2\ccache-4.10.2-windows-x86_64;C:\esp.espressif\tools\dfu-util\0.11\dfu-util-0.11-win64;C:\esp.espressif\python_env\idf5.3_py3.11_env\Scripts;C:\esp\v5.3.2\esp-idf\tools;%PATH%
IDF_DEACTIVATE_FILE_PATH: C:\AppData\Local\Temp\tmprvkdftltidf_8240
User extra vars (idf.customExtraVars)
OPENOCD_SCRIPTS: C:\esp.espressif\tools\openocd-esp32\v0.12.0-esp32-20230921/openocd-esp32/share/openocd/scripts
IDF_CCACHE_ENABLE: 1
ESP_ROM_ELF_DIR: C:\esp.espressif\tools\esp-rom-elfs\20230320/
System python Path (idf.pythonInstallPath) C:\esp.espressif\tools\idf-python\3.11.2\python.exe
Virtual environment Python path (computed) C:\esp.espressif\python_env\idf5.3_py3.11_env\Scripts\python.exe
Serial port (idf.port) COM1
OpenOCD Configs (idf.openOcdConfigs) interface/ftdi/esp32_devkitj_v1.cfg,target/esp32.cfg
ESP-IDF Tools Path (idf.toolsPath) C:\esp.espressif
Git Path (idf.gitPath) C:\esp.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:\esp.espressif\tools\xtensa-esp-elf-gdb\14.2_20240403\xtensa-esp-elf-gdb\bin: true
Access to C:\esp.espressif\tools\riscv32-esp-elf-gdb\14.2_20240403\riscv32-esp-elf-gdb\bin: true
Access to C:\esp.espressif\tools\xtensa-esp-elf\esp-13.2.0_20240530\xtensa-esp-elf\bin: true
Access to C:\esp.espressif\tools\riscv32-esp-elf\esp-13.2.0_20240530\riscv32-esp-elf\bin: true
Access to C:\esp.espressif\tools\esp32ulp-elf\2.38_20240113\esp32ulp-elf\bin: true
Access to C:\esp.espressif\tools\cmake\3.30.2\bin: true
Access to C:\esp.espressif\tools\openocd-esp32\v0.12.0-esp32-20241016\openocd-esp32\bin: true
Access to C:\esp.espressif\tools\ninja\1.12.1: true
Access to C:\esp.espressif\tools\idf-exe\1.0.3: true
Access to C:\esp.espressif\tools\ccache\4.10.2\ccache-4.10.2-windows-x86_64: true
Access to C:\esp.espressif\tools\dfu-util\0.11\dfu-util-0.11-win64: true
Access to C:\esp.espressif\tools\esp-rom-elfs\20240305: 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:\esp.espressif\tools\xtensa-esp-elf-gdb\14.2_20240403\xtensa-esp-elf-gdb\bin: false
Spaces in C:\esp.espressif\tools\riscv32-esp-elf-gdb\14.2_20240403\riscv32-esp-elf-gdb\bin: false
Spaces in C:\esp.espressif\tools\xtensa-esp-elf\esp-13.2.0_20240530\xtensa-esp-elf\bin: false
Spaces in C:\esp.espressif\tools\riscv32-esp-elf\esp-13.2.0_20240530\riscv32-esp-elf\bin: false
Spaces in C:\esp.espressif\tools\esp32ulp-elf\2.38_20240113\esp32ulp-elf\bin: false
Spaces in C:\esp.espressif\tools\cmake\3.30.2\bin: false
Spaces in C:\esp.espressif\tools\openocd-esp32\v0.12.0-esp32-20241016\openocd-esp32\bin: false
Spaces in C:\esp.espressif\tools\ninja\1.12.1: false
Spaces in C:\esp.espressif\tools\idf-exe\1.0.3: false
Spaces in C:\esp.espressif\tools\ccache\4.10.2\ccache-4.10.2-windows-x86_64: false
Spaces in C:\esp.espressif\tools\dfu-util\0.11\dfu-util-0.11-win64: false
Spaces in C:\esp.espressif\tools\esp-rom-elfs\20240305: 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.3.2
Python version 3.11.2
Python's pip version 24.3.1
-------------------------------------------------- Project configuration settings ----------------------------------------------------------
-------------------------------------------------- Python packages in Virtual environment Python path (computed) ---------------------------
annotated-types version: 0.7.0
bitarray version: 2.9.3
bitstring version: 4.2.3
certifi version: 2024.12.14
cffi version: 1.17.1
charset-normalizer version: 3.4.0
click version: 8.1.7
colorama version: 0.4.6
construct version: 2.10.70
cryptography version: 42.0.8
ecdsa version: 0.19.0
esp-coredump version: 1.12.0
esp-idf-kconfig version: 2.3.0
esp-idf-monitor version: 1.5.0
esp_idf_nvs_partition_gen version: 0.1.6
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.3
idf-component-manager version: 2.1.1
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: 24.3.1
pyclang version: 0.6.0
pycparser version: 2.22
pydantic version: 2.10.3
pydantic_core version: 2.27.1
pydantic-settings version: 2.7.0
pyelftools version: 0.31
pygdbmi version: 0.11.0.0
Pygments version: 2.18.0
pyparsing version: 3.2.0
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.6
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.0
---------------------------------------------------- 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": "gdb",
"name": "Attach to QEMU",
"request": "attach",
"gdbpath": "C:/esp/.espressif/tools/xtensa-esp-elf-gdb/14.2_20240403/xtensa-esp-elf-gdb/bin/xtensa-esp32-elf-gdb.exe",
"executable": "${workspaceFolder}/build/${workspaceFolderBasename}.elf",
"target": ":1234",
"remote": true,
"cwd": "${workspaceRoot}",
"valuesFormatting": "parseText"
},
{
"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-13.2.0_20240530\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": false
}
}
],
"version": 4
}

----------------------------------------------------------- Latest error -----------------------------------------------------------------
{
"code": 1,
"killed": false,
"signal": null,
"cmd": "C:\esp\.espressif\python_env\idf5.3_py3.11_env\Scripts\python.exe C:\esp\v5.3.2\esp-idf\tools\check_python_dependencies.py -r c:\.vscode\extensions\espressif.esp-idf-extension-1.9.1\esp_debug_adapter\requirements.txt"
}

----------------------------------------------------------- Logfile -----------------------------------------------------------------
{"message":"Cannot access filePath: ${env:ADF_PATH}","stack":"Error: ENOENT: no such file or directory, access 'C:\Program Files\Microsoft VS Code\${env:ADF_PATH}'\n\tat Object.accessSync (node:fs:246:11)\n\tat t.accessSync (node:electron/js2c/node_init:2:9332)\n\tat Fe (c:\Users\Johannes\.vscode\extensions\espressif.esp-idf-extension-1.9.1\dist\extension.js:2:1432827)\n\tat c:\Users\Johannes\.vscode\extensions\espressif.esp-idf-extension-1.9.1\dist\extension.js:2:1668618\n\tat Pa (c:\Users\Johannes\.vscode\extensions\espressif.esp-idf-extension-1.9.1\dist\extension.js:2:1669787)\n\tat process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n\tat async c:\Users\Johannes\.vscode\extensions\espressif.esp-idf-extension-1.9.1\dist\extension.js:2:1893406","level":"error","timestamp":"2025-03-13T13:26:07.594Z"}
{"message":"Cannot access filePath: ${env:MDF_PATH}","stack":"Error: ENOENT: no such file or directory, access 'C:\Program Files\Microsoft VS Code\${env:MDF_PATH}'\n\tat Object.accessSync (node:fs:246:11)\n\tat t.accessSync (node:electron/js2c/node_init:2:9332)\n\tat Fe (c:\Users\Johannes\.vscode\extensions\espressif.esp-idf-extension-1.9.1\dist\extension.js:2:1432827)\n\tat c:\Users\Johannes\.vscode\extensions\espressif.esp-idf-extension-1.9.1\dist\extension.js:2:1668796\n\tat Pa (c:\Users\Johannes\.vscode\extensions\espressif.esp-idf-extension-1.9.1\dist\extension.js:2:1669787)\n\tat process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n\tat async c:\Users\Johannes\.vscode\extensions\espressif.esp-idf-extension-1.9.1\dist\extension.js:2:1893406","level":"error","timestamp":"2025-03-13T13:26:07.594Z"}
{"message":"Cannot access filePath: ${env:ESP_MATTER_PATH}","stack":"Error: ENOENT: no such file or directory, access 'C:\Program Files\Microsoft VS Code\${env:ESP_MATTER_PATH}'\n\tat Object.accessSync (node:fs:246:11)\n\tat t.accessSync (node:electron/js2c/node_init:2:9332)\n\tat Fe (c:\Users\Johannes\.vscode\extensions\espressif.esp-idf-extension-1.9.1\dist\extension.js:2:1432827)\n\tat c:\Users\Johannes\.vscode\extensions\espressif.esp-idf-extension-1.9.1\dist\extension.js:2:1668888\n\tat Pa (c:\Users\Johannes\.vscode\extensions\espressif.esp-idf-extension-1.9.1\dist\extension.js:2:1669787)\n\tat process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n\tat async c:\Users\Johannes\.vscode\extensions\espressif.esp-idf-extension-1.9.1\dist\extension.js:2:1893406","level":"error","timestamp":"2025-03-13T13:26:07.595Z"}
{"message":"Cannot access filePath: ${env:HOMEKIT_PATH}","stack":"Error: ENOENT: no such file or directory, access 'C:\Program Files\Microsoft VS Code\${env:HOMEKIT_PATH}'\n\tat Object.accessSync (node:fs:246:11)\n\tat t.accessSync (node:electron/js2c/node_init:2:9332)\n\tat Fe (c:\Users\Johannes\.vscode\extensions\espressif.esp-idf-extension-1.9.1\dist\extension.js:2:1432827)\n\tat c:\Users\Johannes\.vscode\extensions\espressif.esp-idf-extension-1.9.1\dist\extension.js:2:1668984\n\tat Pa (c:\Users\Johannes\.vscode\extensions\espressif.esp-idf-extension-1.9.1\dist\extension.js:2:1669787)\n\tat process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n\tat async c:\Users\Johannes\.vscode\extensions\espressif.esp-idf-extension-1.9.1\dist\extension.js:2:1893406","level":"error","timestamp":"2025-03-13T13:26:07.595Z"}


Extension

No response

Description

QEMU Debug & Monitor throw Error:
C:\esp.espressif\tools\xtensa-esp-elf\esp-13.2.0_20240530\xtensa-esp-elf\bin\qemu-system-xtensa.exe: -drive file='c:\esp\projects\WebConfig\build\merged_qemu.bin',if=mtd,format=raw: Unknown protocol ''c'

Please change in qemuManager.ts lines 127 & 135 from
file='${qemuFile.fsPath}',if=mtd,format=raw,

to
file=build/merged_qemu.bin,if=mtd,format=raw,

Filename is constant at relative path. This runs under Windows and should also run under Linux.

Debug Message

C:\esp.espressif\tools\xtensa-esp-elf\esp-13.2.0_20240530\xtensa-esp-elf\bin\qemu-system-xtensa.exe: -drive file='c:\esp\projects\WebConfig\build\merged_qemu.bin',if=mtd,format=raw: Unknown protocol ''c'

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.
@JohannesKaranitsch JohannesKaranitsch added the bug-report Bug Report from users on Github (don't use this tag manually, its supposed to be used via the issue) label Mar 13, 2025
@github-actions github-actions bot changed the title QEMU Debug & Monitor Error on Windows QEMU Debug & Monitor Error on Windows (VSC-1624) Mar 13, 2025
@brianignacio5
Copy link
Collaborator

Hi @JohannesKaranitsch

We added a PR #1462 to fix QEMU issues regarding monitor and debug but this should fix your issue too.

You can test these changes by installing this vsix installer by click menu View -> Command Palette..., type Install from VSIX and then select downloaded esp-idf-extension.vsix file to install the extension.

Copy link

Thanks for using our extension! 🚀

Your feedback matters! Could you take a moment to rate it on the marketplace? A positive rating helps other developers discover our tools and motivates us to keep improving.

⭐ Rate ESP-IDF Extension: https://marketplace.visualstudio.com/items?itemName=espressif.esp-idf-extension&ssr=false#review-details

Your support means a lot to our development team!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-report Bug Report from users on Github (don't use this tag manually, its supposed to be used via the issue)
Projects
None yet
2 participants