debugging-instruments

Debugs iOS app crashes and bottlenecks using LLDB and Xcode Instruments profiles.

Updated May 10, 2026
One-click install
npx skills add https://github.com/FelixRauch/medat-figuren --skill debugging-instruments-felixrauch
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: debugging-instruments
Source: https://github.com/FelixRauch/medat-figuren/tree/main/.agents/skills/debugging-instruments
Command: npx skills add https://github.com/FelixRauch/medat-figuren --skill debugging-instruments-felixrauch

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Debug iOS issues by diagnosing crashes, memory leaks, retain cycles, main-thread hangs, and performance regressions with LLDB and profiling tools like Instruments.

Core Features & Use Cases

  • LLDB Debugging: Inspect variables, manage breakpoints (including conditional and logpoints), evaluate expressions, and use watchpoints to catch unexpected state changes.
  • Memory Debugging: Use Memory Graph Debugger, enable Malloc Stack Logging, identify leaked objects, and recognize common retain cycle patterns; complement with Allocations/Leaks in Instruments.
  • Hang & Performance Diagnostics: Identify main-thread stalls, profile with Time Profiler, and use signposts/MetricKit-related techniques to pinpoint slow paths.

Quick Start

Diagnose a suspected main-thread hang by running the app in Debug to set LLDB breakpoints, then switch to Instruments with the Time Profiler template to record the interaction on a device and locate the hottest main-thread frames.

Frequently Asked Questions about debugging-instruments

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find memory leaks and retain cycles in an iOS app?

To find memory leaks and retain cycles in an iOS app, use the Xcode Memory Graph Debugger alongside Instruments. Enable Malloc Stack Logging in your scheme diagnostics to identify leaked objects and recognize common retain cycle patterns effectively.

What is the best way to diagnose main thread hangs in iOS?

The best way to diagnose main thread hangs is to run your app in Debug to set LLDB breakpoints, then switch to the Instruments Time Profiler template to record the interaction and locate the hottest main-thread frames causing the stalls.

How does LLDB help with debugging iOS app crashes?

LLDB helps debug iOS app crashes by allowing you to inspect variables, manage conditional breakpoints and logpoints, evaluate expressions at runtime, and use watchpoints to catch unexpected state changes during troubleshooting.

Can I use Xcode Instruments for CPU and energy profiling?

Yes, you can use Xcode Instruments for CPU and energy profiling by selecting templates like Time Profiler, Allocations, and Leaks to pinpoint slow execution paths and identify performance bottlenecks on a physical device.

When do I need Malloc Stack Logging for memory debugging?

You need Malloc Stack Logging when tracking down memory leaks and retain cycles in Xcode, as it captures allocation backtraces required by the Memory Graph Debugger to trace leaked objects back to their creation points.