# debugging-instruments

Helps debug crashes, find retain cycles, and diagnose main-thread hangs in iOS apps using LLDB, Memory Graph Debugger, and Instruments.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 4100 installs · ★ 1237
- Author: dpearson2699
- License: LicenseRef-Unknown · policy=link-only · description only; the file stays with the author
- Source: https://github.com/dpearson2699/swift-ios-skills/tree/HEAD/skills/debugging-instruments/SKILL.md
- Updated: 2026-07-31
- HTML: https://affpapa.org/en/nevibecode/skills/debugging-instruments

## What it does

The skill lays out triage workflows for iOS debugging in Xcode. It structures LLDB inspection, advising `v` over `po` for inspecting locals because expression evaluation can mutate program state. Evaluating expressions carries side effects. It also covers common retain cycles in closures and delegates.

Profiling guidance covers UI hangs and memory spikes. It pairs the Time Profiler and `OSSignposter` intervals with Xcode diagnostics like the Thread Checker. To see allocation backtraces in the Memory Graph Debugger, you must enable Malloc Stack Logging in your scheme diagnostics first.

For deep command-line `.memgraph` analysis or ETTrace profiling, the skill delegates to sibling skills like `ios-memgraph-analysis`. It stays focused on live interactive triage inside Xcode and Instruments.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill debugging-instruments -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/debugging-instruments/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/debugging-instruments/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill debugging-instruments -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/debugging-instruments/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill debugging-instruments -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/debugging-instruments/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install dpearson2699/swift-ios-skills debugging-instruments
```

2. **Manually: put the files in place**
- File: `.github/skills/debugging-instruments/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill debugging-instruments -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/dpearson2699/swift-ios-skills --path skills/debugging-instruments
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/debugging-instruments/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill debugging-instruments -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/dpearson2699/swift-ios-skills/tree/HEAD/skills/debugging-instruments/SKILL.md

## When to use it
- find retain cycles in Swift closures and delegate patterns
- diagnose main-thread UI hangs using Time Profiler
- inspect local variables and set conditional breakpoints in LLDB
- isolate memory leaks using Xcode Memory Graph Debugger

## Example prompts
- Help me set an LLDB conditional breakpoint on ViewModel.swift to track state mutation
- Show me how to fix a retain cycle caused by a closure capturing self
- Guide me through profiling a main-thread freeze with Time Profiler and OSSignposter

## Similar
- [performance-profiling](https://affpapa.org/en/nevibecode/skills/mengto-performance-profiling.md) — skill · 1400 installs
- [axiom-performance](https://affpapa.org/en/nevibecode/skills/axiom-performance.md) — skill · 1300 installs
- [mobile-app-debugging](https://affpapa.org/en/nevibecode/skills/mobile-app-debugging.md) — skill · 561 installs
- [ios-simulator-skill](https://affpapa.org/en/nevibecode/skills/ios-simulator-skill.md) — skill · 2400 installs
- [axiom-build](https://affpapa.org/en/nevibecode/skills/axiom-build.md) — skill · 1300 installs
- [test-modernizer](https://affpapa.org/en/nevibecode/skills/test-modernizer.md) — skill · 696 installs

From the same set: [dpearson2699/swift-ios-skills](https://affpapa.org/en/nevibecode/by/dpearson2699/swift-ios-skills.md) — 69 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
