rust-debugginglisted
Install: claude install-skill Dankosik/rust-service-template-rest
# Rust Debugging
**Causality.** Find the first observable divergence between the intended and the actual execution path, and choose the observation that could disprove the leading explanation rather than confirm it. Honor supplied requirements and preserve settled choices outside the requested change; resolve only what the task leaves open.
Separate the failure classes before reproducing anything. A compiler or clippy diagnostic needs no process. A configuration rejection prints the offending key on standard error and exits with failure. A startup failure logs a startup-failed event. A degraded shutdown exits with its distinct code and names the overrun stage in the shutdown events. A hang has a task without an owner or a wait without a bound. Read an error chain to its source, and read the shutdown and drain events in order before guessing which stage stalled.
Reproduce at the smallest layer that still fails: a unit test with a paused clock, the router through a one-shot call, the bounded server on an ephemeral port, then the binary. Preserve raw standard output, standard error, exit status, and timings when their differences explain the symptom. Debug level and text format through the APP environment make a local run readable, and a backtrace variable explains a panic; the tokio console is a diagnostic session behind an unstable cfg flag, not a dependency.
For a flaky async test, suspect an unbounded wait, a sleep used as synchronization, the standard library's Instant