wokwi-features
wokwi-features copied to clipboard
GDB in VS Code: ERROR: Unable to start debugging. Failed to find thread 1 for break event
trafficstars
Describe the bug
I'm trying to use GDB in VS Code. I followed the instructions on https://docs.wokwi.com/de-DE/vscode/debugging but I always get the error message ERROR: Unable to start debugging. Failed to find thread 1 for break event. I've attached the GDB extended log below for more details.
VS-Code Launch Configuration:
{
"name": "Wokwi GDB",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/.pio/build/uno/firmware.elf",
"cwd": "${workspaceFolder}",
"MIMode": "gdb",
"miDebuggerPath": "${userHome}/.platformio/packages/toolchain-atmelavr/bin/avr-gdb.exe",
"miDebuggerServerAddress": "localhost:3333",
"logging": {
"engineLogging": true
}
}
platformio.ini
[env:uno]
platform = atmelavr
board = uno
framework = arduino
build_type = debug
lib_deps =
paulstoffregen/TimerOne@^1.1.1
thijse/ArduinoLog@^1.1.1
To Reproduce
- Compile a "Hello World" app using PlatformIO
- Run "Wokwi: Start Simulator and Wait for Debugger"
- Start the GDB debug session
Expected behavior GDB should attach/start without issues
Environment (please complete the following information):
- Windows 10
- PlatoformIO (Core 6.1.15 , Home: 3.4.4)
- Wokwi Simulator Plugin 2.5.1
Diagram diagram.json