Agent skill · software engineering · dpearson2699
debugging-instruments
Debug iOS apps and profile performance using LLDB, the interactive Memory Graph Debugger, and Instruments. Use for crashes, retain-cycle inspection, hangs, build failures, and generic CPU, memory, energy, or network profiling. Use ios-memgraph-analysis for .memgraph capture, leaks CLI ownership paths, or persistent heap growth; use ios-ettrace-performance for ETTrace capture and JSON.
Why this skill is useful
Adds specific LLDB commands and Instruments workflows for debugging iOS apps that the AI wouldn't reliably generate on its own.
What it needs
Requires xcode installed locally. About 8k tokens when loaded. Last updated 2026-07-31. 973 stars on the source repository.
What this skill does
Debugging and Instruments Keep interactive graph and Instruments triage here. Route detailed .memgraph command-line ownership/growth analysis and ETTrace work to their focused skills. Contents LLDB Debugging Memory Debugging Hang Diagnostics Build Failure Triage Instruments Overview Common Mistakes Review Checklist References LLDB Debugging Start with a small, repeatable workflow: 1. Reproduce in a Debug build and stop at the narrowest useful breakpoint. 2. Inspect locals without executing code, then capture the current stack. 3. Move to the relevant frame or thread and verify the failing state. 4. Add a condition or watchpoint only when the bad transition is still unclear. Use v over po when you only need a local variable value — it does not execute code and cannot trigger side effects. Expression evaluation can execute or mutate program state, and hardware watchpoints are scarce, so use both deliberately. Load references/lldb-patterns.md for the complete inspection, breakpoint/logpoint, expression, watchpoint, thread navigation, and symbolic-breakpoint command tables. Memory Debugging Memory Graph Debugger Workflow 1. Run the app in Debug configuration. 2. Reproduce the suspected leak (navigate to a screen, then back). 3. Tap the Memory Graph button in Xcode's debug bar. 4. Look for purple warning icons — these indicate leaked objects. 5. Select a leaked object to see its reference graph and backtrace. Enable Malloc Stack Logging (Scheme > Diagnostics) before running so the Memory Graph shows allocation backtraces. Common Retain Cycle Patterns Closure capturing self strongly: Strong delegate reference: Timer retaining target: Instruments: Allocations and Leaks Allocations template: Track memory growth over time. Use the "Mark Generation" feature to isolate allocations created between user actions (e.g., open/close a screen). Leaks template: Detects leaked allocations, including isolated retain cycles the process can no longer reach. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills dpearson2699/debugging-instruments