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.
86%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Diagnose crashes, memory leaks, hangs, and performance bottlenecks using LLDB, Xcode Memory Graph Debugger, unified logging/signposts, and Instruments.
Scope Boundary: Route command-line
.memgraphanalysis toios-memgraph-analysisand ETTrace tracing toios-ettrace-performance.
Follow a structured, non-invasive triage loop:
v, falling back to po only for formatted descriptions.(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
(lldb) br modify 1 -c "orderId == 404" # Set condition on breakpoint
(lldb) w set v self.totalAmount # Watchpoint on memory mutationEnable Malloc Stack Logging (Edit Scheme > Run > Diagnostics) to record allocation backtraces.
Common fix: break closure cycles using [weak self] or assign delegates weakly (weak var delegate: SomeDelegate?).
Diagnose main thread stalls and measure execution intervals using unified logging and OSSignposter:
import os
let logger = Logger(subsystem: "com.example.app", category: "DataSync")
let signposter = OSSignposter(logger: logger)
func loadRecords() async throws {
let signpostID = signposter.makeSignpostID()
let state = signposter.beginInterval("LoadRecords", id: signpostID)
defer { signposter.endInterval("LoadRecords", state) }
// Intensive operation
}View intervals and subsystem events in Instruments under the os_signpost instrument.
Always profile in Release configuration outside the debugger (Product > Profile):
xctrace record accepts recording options as JSON; xctrace export gains time-range arguments and accepts .atrc and .logarchive input.Sources: https://sosumi.ai/documentation/xcode-release-notes/xcode-27-release-notes, https://sosumi.ai/documentation/ios-ipados-release-notes/ios-ipados-27-release-notes
po for simple inspection: po evaluates expressions via the Swift runtime and can cause unexpected side effects or deadlocks. Use v to read values safely.@MainActor trigger main-thread hangs.v over po to avoid side effects[weak self] or weak delegatesthienqo/ios-skills
6bf8b62
Canonical home
since May 23, 2026
Also appears in
on Oct 29, 2026
since May 22, 2026
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.