wokwi-features icon indicating copy to clipboard operation
wokwi-features copied to clipboard

GDB in VS Code: ERROR: Unable to start debugging. Failed to find thread 1 for break event

Open mathias-buder opened this issue 1 year ago • 0 comments
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

  1. Compile a "Hello World" app using PlatformIO
  2. Run "Wokwi: Start Simulator and Wait for Debugger"
  3. 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

gdb_log.txt

Diagram diagram.json

image

mathias-buder avatar Jul 31 '24 21:07 mathias-buder