start_debug_session
Start an STM32 GDB debug session by launching OpenOCD, ST-Link, or J-Link and connecting the GDB client, with profile defaults or supplied probe/session options.
Instructions
Starts the specified GDB Server (openocd, stlink, jlink) and connects the GDB Client to it. openocd REQUIRES server_args naming the probe and target, e.g. ['-f','interface/stlink.cfg','-f','target/stm32l4x.cfg'] — without them OpenOCD cannot find a config or adapter. Omitted values come from the active debug profile.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| probe | No | Optional OpenOCD probe type: stlink, jlink, or cmsis-dap. Falls back to the profile, then a unique detected probe. | |
| serial | No | Probe/ST-Link serial to select a specific board (for concurrent multi-target). Auto-added as 'adapter serial <serial>'. | |
| session | No | Optional debug-session name. Omit for the default target. | |
| speed_khz | No | OpenOCD adapter clock used when server_args are inferred (default 4000). | |
| hub_channel | No | Take the probe on this hub channel, using the usb_location recorded for it in the profile's hub.map. Falls back to hub.channel, then to the map entry whose label matches this session's name. | |
| server_args | No | Optional args for the server e.g. ['-f', 'interface/stlink.cfg', '-f', 'target/stm32f4x.cfg'] | |
| server_type | No | Type of debug server backend. | |
| usb_location | No | Select the probe by physical USB position, e.g. '1-1.4'. This is how to pick one of several probes that report NO serial number (most clone ST-Links), and unlike hub isolation it disconnects nobody -- two sessions can debug two boards at once. Added as 'adapter usb location <value>'. Usually you want hub_channel instead, which looks this up. |