← ClaudeAtlas

debugging-instrumentslisted

Debug iOS apps and profile performance using LLDB, Memory Graph Debugger, and Instruments. Use when diagnosing crashes, memory leaks, retain cycles, main thread hangs, slow rendering, build failures, or when profiling CPU, memory, energy, and network usage.
dpearson2699/swift-ios-skills · ★ 640 · Code & Development · score 81
Install: claude install-skill dpearson2699/swift-ios-skills
# Debugging and Instruments Diagnose crashes, memory leaks, retain cycles, main thread hangs, and performance bottlenecks in iOS apps using LLDB, Memory Graph Debugger, and Instruments. Covers breakpoint workflows, memory graph analysis, hang detection, build failure triage, and Instruments profiling for CPU, memory, energy, and network. ## Contents - [LLDB Debugging](#lldb-debugging) - [Memory Debugging](#memory-debugging) - [Hang Diagnostics](#hang-diagnostics) - [Build Failure Triage](#build-failure-triage) - [Instruments Overview](#instruments-overview) - [Common Mistakes](#common-mistakes) - [Review Checklist](#review-checklist) - [References](#references) ## LLDB Debugging ### Essential Commands ```text (lldb) po myObject # Print object description (calls debugDescription) (lldb) p myInt # Print with type info (uses LLDB formatter) (lldb) v myLocal # Frame variable — fast, no code execution (lldb) bt # Backtrace current thread (lldb) bt all # Backtrace all threads (lldb) frame select 3 # Jump to frame #3 in the backtrace (lldb) thread list # List all threads and their states (lldb) thread select 4 # Switch to thread #4 ``` Use `v` over `po` when you only need a local variable value — it does not execute code and cannot trigger side effects. ### Breakpoint Management ```text (lldb) br set -f ViewModel.swift -l 42 # Break at file:line (lld