/wokwi:debug-esp32-firmwarefrom wokwi
Debug ESP32 firmware on the Wokwi simulator, no board or JTAG needed. Decode a panic backtrace, reproduce the bug with scripted inputs, capture I2C/SPI/UART traffic to a VCD file, attach GDB from the CLI or VS Code. Use for crashes, panics, watchdog resets, hangs, intermittent faults and wrong bus traffic.
Ships in wokwi. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The simulator runs the real firmware with every pin visible and can pause it, so the same
inputs give the same crash at the same instruction. Needs wokwi-cli 0.29 or newer and the
ESP-IDF toolchain on PATH (. $IDF_PATH/export.sh).
Decode the panic with the ELF of the exact build that crashed (a rebuild moves every
address). Exceptions print Guru Meditation Error: Core 0 panic'ed (LoadProhibited),
abort()/ESP_ERROR_CHECK print abort() was called at PC 0x..., assert prints
assert failed:; on Xtensa all end in Backtrace: with pc:sp pairs. Decode the pcs:
xtensa-esp32s3-elf-addr2line -pfiaC -e build/app.elf 0x4037b38b 0x4200af79
# 0x4037b38b: _esp_error_check_failed at .../esp_system/esp_err.c:38
# 0x4200af79: app_main at .../main/main.c:129 (discriminator 1)
Make it reproduce. Script the trigger as an automation scenario:
steps:
- wait-serial: 'app: ready'
- set-control: { part-id: btn1, name: pressed, value: 1 }
- delay: 50ms
- set-control: { part-id: btn1, name: pressed, value: 0 }
wokwi-cli . --scenario repro.yaml --fail-text 'Guru Meditation Error' exits 1 when the
text appears, 0 when the scenario completes, 42 at --timeout (default 30 s simulated).
Keep the scenario in CI as the regression test once the bug is fixed, with the serial log
(--serial-log-file serial.log, Action input serial_log_file) uploaded if: always().
Trace the bus. Add a wokwi-logic-analyzer to diagram.json, wire D0..D7 to the
signals (SDA/SCL, MOSI/MISO/SCK/CS, TX/RX) and GND to ground, run with --vcd-file capture.vcd, open in PulseView (decoders for UART, I2C, WS2812), GTKWave or Surfer.
triggerMode: edge with triggerPin/triggerLevel starts recording at the moment of
interest.
Attach GDB. Start paused, connect with the GDB that matches the chip:
wokwi-cli . --gdb-server-port 3333 --timeout 0
# GDB server listening on port 3333. Simulation is paused until gdb connects: ...
xtensa-esp32s3-elf-gdb build/app.elf -ex 'target remote localhost:3333'
(gdb) break esp_system_abort # every abort/assert/ESP_ERROR_CHECK failure stops here
(gdb) continue # Thread 1 hit Breakpoint 1, esp_system_abort (...)
(gdb) bt # #2 _esp_error_check_failed (rc=-1, file="./main/main.c", line=129, ...)
break app_main steps from the top; --timeout 0 disables the 30 s timeout that would
end the session. VS Code drives the same server: gdbServerPort = 3333 in wokwi.toml, a
cppdbg launch config with miDebuggerServerAddress: localhost:3333 and miDebuggerPath: ${command:espIdf.getToolchainGdb}, "Wokwi: Start Simulator and Wait for Debugger", F5.
--fail-text 'Guru Meditation Error' misses aborts: an abort(), assert or
ESP_ERROR_CHECK panic prints no such line, so the run loops and exits 42 at the timeout.
One string only; --fail-text 'Rebooting...' catches every panic (default panic config).Remote 'g' packet reply is too long: wrong GDB; C3/C6 need riscv32-esp-elf-gdb.gdbServerPort in wokwi.toml pauses every run, CI included, until GDB connects. The
CLI auto-creates such a wokwi.toml for ESP-IDF projects; drop the line, use the flag.Task watchdog got triggered in the log lists the tasks that starved.Docs: https://docs.wokwi.com/wokwi-ci/cli-usage#debugging-with-gdb. Demo with a VS Code debug config: https://github.com/wokwi/esp32-idf-hello-wifi.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
4 skills in this plugin
/find-memory-leaksFind memory leaks in ESP-IDF firmware in CI. The Wokwi simulator watches the free heap while a scenario compresses hours of use into seconds and fails the run when the heap drops below a limit; no logging code in the firmware. Use for suspected leaks, soak, stress or endurance tests, or a device that runs out of memory after hours or days./test-lvgl-uiTest an LVGL (or any other) embedded GUI in CI on the Wokwi simulator. Scripted taps and button presses drive the screen; the simulated display is compared pixel by pixel against reference PNGs, without a board. Use to test or regression-check a display UI, screen, menu or widget on ESP32 or other MCUs, or when someone mentions LVGL, TFT_eSPI, ILI9341, ST7789, GC9A01, SSD1306, a custom chip display, a touchscreen, `take-screenshot` or `compare-with`./verify-esp-idf-buildRun and verify ESP-IDF firmware on the Wokwi simulator from idf.py (`idf.py wokwi`, the idf-wokwi extension), no board attached. Use to smoke-test an ESP-IDF 6.x build, check that it prints a serial message, or run it without a devkit, including right after an agent built it.npx claudepluginhub wokwi/skills --plugin wokwi