debugging-instrumentslisted
Install: claude install-skill thienqo/ios-skills
# Debugging and Instruments
Diagnose crashes, memory leaks, hangs, and performance bottlenecks using LLDB, Xcode Memory Graph Debugger, unified logging/signposts, and Instruments.
> **Scope Boundary:** Route command-line `.memgraph` analysis to `ios-memgraph-analysis` and ETTrace tracing to `ios-ettrace-performance`.
## Contents
- [LLDB Debugging Workflow](#lldb-debugging-workflow)
- [Memory Graph & Retain Cycles](#memory-graph--retain-cycles)
- [Hangs & Signpost Diagnostics](#hangs--signpost-diagnostics)
- [Instruments Profiling](#instruments-profiling)
- [iOS 27 Updates](#ios-27-updates)
- [Common Mistakes](#common-mistakes)
- [Review Checklist](#review-checklist)
- [References](#references)
## LLDB Debugging Workflow
Follow a structured, non-invasive triage loop:
1. Reproduce in Debug configuration; pause at the narrowest relevant line.
2. Inspect values without executing code using `v`, falling back to `po` only for formatted descriptions.
3. Traverse frames and threads to isolate invalid states.
4. Set conditional breakpoints or watchpoints to catch unintended state transitions.
```text
(lldb) br set -f OrderViewModel.swift -l 42 # Break at file and line
(lldb) v orderState # Inspect variable without code execution
(lldb) po orderState # Print debug description
(lldb) bt all # Print backtrace for all threads
(lldb) frame select 2 # Switch execution frame
(