In debug mode, Embedder can drive GDB on your behalf to set breakpoints, inspect registers, walk an RTOS task list, or snapshot a live target. You don’t need to writeDocumentation Index
Fetch the complete documentation index at: https://docs.embedder.com/llms.txt
Use this file to discover all available pages before exploring further.
.gdbinit files or pick a backend — describe the symptom and the agent picks the right approach.
Prerequisites
Be in debug mode
Run
/debug or click the Debug button. GDB tools are unavailable in act and plan modes.Connect a probe
Embedder supports J-Link (Segger) and OpenOCD (ST-Link, CMSIS-DAP, DAPLink, NXP LPC-Link2 / MCU-Link).
Set the debug interface
Add this line to your project’s Valid values:
EMBEDDER.md:EMBEDDER.md
jlink, st-link, cmsis-dap, serial. If missing, Embedder uses whichever probe it detects first.On first use, Embedder downloads a managed
arm-none-eabi-gdb-py3 toolchain to ~/.embedder/tools/gdb/. If hardware_status reports managedGdb.state as installing, wait for it to finish before prompting for GDB.Example prompts
The device hangs and you don’t know where:embedder


embedder
embedder
embedder
embedder
embedder
What the agent does for you
When you prompt for GDB in debug mode, Embedder writes a Python script under.embedder/hardware/ that connects via J-Link or OpenOCD, performs the inspection, and returns structured results to the chat. You’ll see the script in the tool call before it runs — you can stop or edit it if needed.
By default it does not flash, reset, or erase the chip unless you explicitly ask. If you need a fresh start, say “flash the firmware first” or “reset the chip and break at main”.
Common gotchas
J-Link not detected
J-Link not detected
Make sure J-Link software is installed (Embedder offers to install it on debug mode entry if missing). On macOS, plug the probe in before starting Embedder so USB enumeration completes.
Wrong device name
Wrong device name
J-Link wants device names like
nRF52840_xxAA. If the agent picks the wrong one, set it explicitly in your prompt: “use device nRF52840_xxAA” or list it in EMBEDDER.md under Target MCU.OpenOCD can't find a target config
OpenOCD can't find a target config
Set
Target MCU = stm32f407vg (or the closest match) in EMBEDDER.md. Embedder uses this to pick the OpenOCD target file. If your chip isn’t a stock OpenOCD target, you may need to provide your own target.cfg and reference it in EMBEDDER.md.Variables show as <optimized out>
Variables show as <optimized out>
Build with
-Og or -O0 for the parts you’re inspecting. With -O2 / -Os, GDB often can’t recover local variables.Agent wants to flash and reset; you don't
Agent wants to flash and reset; you don't
Say “attach without resetting” or “non-intrusive attach”. Combine it with “no halt” if you want the chip to keep running while the agent reads state.
Next steps
Combined workflows
Pair GDB with logic captures and power profiling.
Debug mode overview
Back to the OHPV loop and other instruments.