rust-debugging

Diagnose Rust borrow checker, lifetime, type, and runtime issues.

1|Updated Mar 22, 2026
One-click install
npx skills add https://github.com/caraya/agent-skills --skill rust-debugging-caraya
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rust-debugging
Source: https://github.com/caraya/agent-skills/tree/main/skills/rust-debugging
Command: npx skills add https://github.com/caraya/agent-skills --skill rust-debugging-caraya

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers diagnose and fix Rust compile-time and runtime issues, including borrow checker errors, panics, undefined behavior in unsafe blocks, and FFI boundary problems.

Core Features & Use Cases

  • Diagnose compile-time errors (borrow checker, lifetime, type issues) with actionable guidance.
  • Debug runtime panics, segfaults, and logic errors using LLDB/GDB, with Rust-specific pretty-printers and VS Code setup.
  • Use cargo tools (cargo check, cargo clippy, cargo test) to accelerate diagnosis and code quality.
  • Async debugging with tokio-console to inspect tasks and concurrency issues.

Quick Start

Enable backtraces, run the program to reproduce the failure, and attach a debugger (LLDB or GDB) for interactive diagnosis.

Frequently Asked Questions about rust-debugging

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix Rust borrow checker and lifetime compilation errors?

Resolve Rust borrow checker and lifetime errors by running cargo check to isolate the issue and using rustc --explain to decode the error. This Skill provides actionable guidance to fix compile-time ownership and type conflicts efficiently.

How do I debug Rust runtime panics and segfaults using LLDB or GDB?

Debug Rust runtime panics and segfaults by enabling backtraces, reproducing the failure, and attaching rust-lldb or rust-gdb with Rust-specific pretty-printers. You can interactively inspect stack traces and variable states to locate the root cause.

What is the best way to diagnose undefined behavior in unsafe Rust code?

Diagnose undefined behavior in unsafe Rust code by leveraging cargo test and attaching a debugger to inspect FFI boundaries and pointer operations. This Skill helps identify memory safety violations within unsafe blocks during development or CI workflows.

Can I use cargo clippy and cargo expand to find logic errors in Rust?

Yes, you can use cargo clippy to catch common Rust logic errors and anti-patterns, and cargo expand to inspect macro-generated code. These cargo tools accelerate diagnosis by revealing hidden issues before runtime debugging.

How do I debug Rust async tasks and concurrency issues with tokio-console?

Debug Rust async tasks and concurrency issues by integrating tokio-console to inspect runtime task scheduling and state. This Skill covers using tokio-console to identify deadlocks, blocking operations, and other async anomalies in Rust projects.

Does this Skill help set up Rust debugging in VS Code?

Yes, this Skill supports setting up Rust debugging in VS Code by configuring LLDB or GDB with Rust-specific pretty-printers. It provides the necessary steps to enable interactive diagnosis of panics and logic errors within the editor.