What problem does it solve?
Debugging and troubleshooting asynchronous applications built with Tokio can be complex, especially when diagnosing runtime issues, deadlocks, memory leaks, or performance bottlenecks. This Skill provides structured guidance and best practices to observe, reason about, and resolve common Tokio runtime problems.
Core Features & Use Cases
- Realtime runtime inspection: Use tokio-console to observe task spawn rates, poll durations, and resource usage.
- Deadlock and hang debugging: Identify and resolve common async deadlock patterns and hangs.
- Memory leak detection: Spot task leaks, improper shutdowns, and cyclic references in async code.
- Performance profiling: Analyze task metrics to optimize scheduling and reduce jitter.
Quick Start
To begin, enable tokio-console in your Rust project and attach to the running application:
- Add console-subscriber = "0.2" to Cargo.toml.
- Initialize the subscriber at startup with
console_subscriber::init(); before constructing the Tokio runtime.
- Run the application and observe the metrics in the tokio-console UI in a separate terminal.