--- id: "6ab583081835be030dd96982" created: "2026-09-25T05:07:38+09:00" updated: "2026-11-07T01:53:26+09:00" --- Rustのデバッグチートシート https://qiita.com/legokichi/items/e2f807f70316a916f4be Rust 開発環境 エディタ / LSP [VS Code] [Rust Analyzer] [Neovim] [vim-lsp-settings] [coc-rust-analyzer] [Rust Analyzer] Structural Search & Replace Formatter [cargo fmt] [cargo tomlfmt] 保存時の自動処理 [cargo-watch] cargo watch -x clippy cargo watch -x check cargo watch -x 'check --tests' cargo watch -x test -- --nocapture cargo watch -x 'run -- ...' [RUST_BACKTRACE] [RUST_LOG] Lint [cargo clippy] 依存関係管理 [cargo tree] cargo tree -i [cargo udeps] [cargo outdated] [cargo update] [cargo-audit] カバレッジ [grcov] コードメトリクス [rust-code-analysis] Rust のビルド高速化・管理 ビルド時間解析 cargo build --timings [Fleet] コンパイルキャッシュ [sccache] 高速リンカ [lld] [mold] Cargo キャッシュ掃除 [cargo-cache] [cargo clean] Docker 上で Cargo build [Docker] glibc バージョン問題 [musl] [Docker] [Zig] [cargo-zigbuild] 最適化 [rustc codegen options] バイナリサイズ最適化 Rust ソースコードのデバッグ [dbg!] 型確認 わざと型エラーを起こす [std::any::type_name] コンパイルエラー 大量のエラーを先頭から潰す [Rust Compiler Error Index] マクロ展開 [cargo expand] cargo expand -- main AST AST確認 依存クレート解析 [docs.rs] [src] [GitHub Issues] [Discord] [Slack] [IRC] Rust情報源 [rust-jp] [Rust公式Discord] [users.rust-lang.org] [Rust Language Cheat Sheet] [Rust Design Patterns] [Rust API Guidelines] [rustc-dev-guide] [Rust Reference] [Platform Support] rustup target list テスト [Rust test] [Tokio] #[tokio::test] [Actix] #[actix_rt::test] 実行バイナリ解析 [cargo-binutils] Linux memory map stack heap shared library [ELF] 動的リンク shared library シンボル解析 [nm] cargo nm -- --demangle [strings] アセンブリ [objdump] cargo objdump [cargo-asm] LLVM IR [cargo llvm-ir] オンライン解析 [Compiler Explorer / Godbolt] [Compiler Explorer / Godbolt] 共有ライブラリ / ELF 調査 [ldd] [readelf] readelf -a readelf -s readelf -h readelf -l readelf -S readelf -A readelf -d [objdump] objdump -T 動的リンカデバッグ LD_DEBUG=all env | grep LD SONAME確認 GLIBC依存バージョン確認 システムコール解析 [strace] strace -tt -T -f executable strace -p PID プロファイリング [cargo-profiler] [Valgrind] [Callgrind] [Cachegrind] [thread_profiler] rr + rust-gdb [rr] record/replay debugger rr record rr replay -d rust-gdb reverse debugging [rust-gdb] [gdb-dashboard] プロセスメモリ コアダンプ [gcore] メモリリーク [Rust sanitizers] [valgrind] Cross compile [QEMU] [qemu-user-static] ARM ARM rootfs [chroot] ARM環境向け Cargo build [rustup] WASM TODO cross compile TODO