recover_session
Restores a dropped or wedged STM32 GDB debug session by tearing down and restarting the server, reconnecting, and escalating to USB hub power cycling if needed.
Instructions
Recovers a dropped or wedged session: cleanly tears down the GDB client and server, then restarts the server (with retry/backoff for a busy probe) using the last start_debug_session arguments and reconnects. Use after a probe_unavailable or connection_lost error. When a programmable USB hub is configured (debug_profile hub.channel), a retry that cannot fix the probe escalates to toggling its USB data lines and then power-cycling the port -- the only in-band cure for a wedged endpoint. Any hub action taken is reported in recovery_steps.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| deep | No | Add a long (2 s) power-off rung to drain bulk capacitance. | |
| session | No | Optional debug-session name. Omit for the default target. | |
| escalate | No | Allow hub data-line/power escalation when a plain retry fails (default true). |