AgentSkillsCN

debug-troubleshoot

针对 Rust 异步代码,结合 Tokio、Turso 与 redb,采用系统化的调试方法。当面临运行时问题、性能瓶颈、异步死锁、数据库连接异常,或程序发生 panic 时,此方法将助你迅速定位并解决问题。

SKILL.md
--- frontmatter
name: debug-troubleshoot
description: Systematic debugging approach for Rust async code with Tokio, Turso, and redb. Use when diagnosing runtime issues, performance problems, async deadlocks, database connection issues, or panics.

Debug and Troubleshoot

Systematic debugging approach for Rust async code with Tokio, Turso, and redb.

Quick Reference

When to Use

  • Diagnosing runtime issues
  • Performance problems
  • Async deadlocks
  • Database connection issues
  • Panics and crashes

Debugging Tools

  1. Logging - tracing with RUST_LOG levels
  2. Tokio Console - Async task inspection
  3. Backtraces - Panic analysis
  4. Metrics - Performance profiling

See logging.md for tracing setup and issues.md for common problems.