GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - n0an/Apple-Debugging-Agent-Skill: Agent skill that debugs iOS, macOS, watchOS, tvOS, and visionOS apps with LLDB and Xcode: breakpoints, live state inspection and mutation, view debugging, watchpoints, memory, crash symbolication, custom LLDB commands, and DTrace

BranchesTags
Open more actions menu

Latest commit

 

History

3 Commits
3 Commits

Folders and files

NameName
Last commit message
Last commit date
.claude-plugin
.claude-plugin
 
 
apple-debugging
apple-debugging
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
gemini-extension.json
gemini-extension.json
 
 

Repository files navigation

Apple Debugging Agent Skill

Apple platforms LLDB in Xcode 15+ Version 1.1.0 MIT License Agent Skills Compatible

An agent skill that teaches AI coding agents like Claude Code, Codex, Cursor, and Gemini to debug Apple platform apps the way an experienced iOS engineer does: with LLDB and Xcode, in the running process, without rebuilding to test every guess.

It uses the Agent Skills format, so it works with Claude Code, Codex, Gemini, Cursor, and more.

What It Covers

  • Fundamentals - how LLDB is wired (debugger plus embedded compiler), command grammar, -- and backticks, help/apropos, the five command families, v vs p vs po vs expression, frame-dependent language contexts (Swift vs Objective-C), $ variables and $R0 results, format shorthands, settings, and a map from Xcode's UI to LLDB commands
  • Attaching and running - Run Without Building, attach by name, PID, or wait-for, stdout ownership when attaching, launch arguments and environment variables that unlock diagnostics, scheme Diagnostics (sanitizers, Main Thread Checker, Zombies, Malloc Stack Logging), per-project LLDB init files, and driving LLDB in batch mode from a terminal or an agent with detach discipline
  • Breakpoints - line, column, symbolic, regex, selector, source-pattern, address, Exception, Swift Error, Runtime Issue, Constraint Error, and Test Failure breakpoints; the Xcode breakpoint editor (conditions, ignore counts, log messages, shell commands, auto-continue); dependent one-shot breakpoints; breakpoint names; raise(SIGSTOP) for hot loops; diagnosing unresolved symbolic breakpoints; stop hooks; breakpoint write/read
  • Inspecting state - frames, threads, bt all, objects by raw address in both languages, registers and $arg1/$arg2 in assembly frames with the arm64 and x86_64 conventions, image lookup, Objective-C runtime introspection (_ivarDescription, _methodDescription, class-table dump), memory reads and dumps, disassembly, globals reachable from a cold pause
  • Flow control - stepping into code without debug info, stepping one thread, the stepping plan stack, thread until, thread return to stub a function, thread jump and dragging the instruction pointer with the cleanup and ABI limitations, expression -i0 to honor breakpoints inside called code
  • Modifying runtime state - mutate values and properties, call methods, flush Core Animation to see changes while paused, declare $ variables, functions, and types, inject a fix with an auto-continuing breakpoint action, replace a line, stub a return, prototype layout live, and verify the source fix without injected behavior
  • View debugging - the Xcode view debugger (click-through, clipped content, constraints, creation backtraces, multiple windows, macOS active-state capture), Environment Overrides, console equivalents (recursiveDescription, _printHierarchy, _autolayoutTrace), the touch-delivery checklist (sendEvent: tracer, hit testing, responder chain, target-action), images and colors via Quick Look or disk, animation slow-down, SwiftUI _printChanges
  • Watchpoints and memory - watchpoints on variables and on computed ivar addresses with hardware limits, the dirty-plus-compressed footprint model, the memory graph, vmmap, heap, leaks --traceTree, malloc_history, memory history, Zombies and sanitizers, limits of enabling stack logging mid-session, and jetsam diagnosis
  • Crashes and symbolication - where reports live, opening .ips/.crash in Xcode against the project, crashlog in LLDB, UUID matching with dwarfdump and mdfind, atos -i, ASLR slide, source maps and -debug-prefix-map, a table of exception types and termination codes, catching exceptions and Swift errors live, deadlocks from bt all
  • Swift debugging - why v works when po fails, swift-healthcheck, module and dSYM pitfalls (static libraries, serialized search paths, stale module cache), static vs dynamic types, optimized code, module-qualified names and mangling, @DebugDescription and CustomDebugStringConvertible, concurrency and SwiftUI specifics, Combine debugging operators
  • Custom commands - .lldbinit locations and the per-scheme init file, command alias with help and %1, command regex with dispatch patterns, Python commands with argument parsing and __lldb_init_module, breakpoint callbacks, type summaries, filters, synthetic children, a starter ~/.lldbinit
  • Debugging without source - Mach-O slices, runtime addresses versus file offsets, dyld shared-cache caveats, inherited Objective-C method lookup, and scoped assembly inspection
  • Assembly and ABI - arm64 and x86_64 arguments/returns, stack frames, DWARF locations, disassembly, and pointer-authentication limits
  • Runtime investigation - blocks, module class dumps, stripped Objective-C stacks, heap instances, singleton storage, cross-references, and scoped Simulator system-process investigations
  • Dynamic loading and hooks - a complete C interposition lab, dlopen/dlsym, saved-IMP swizzling, URLSession observation, and Simulator launch environments
  • Signing and attach diagnostics - entitlements, profiles, hardened runtime, library validation, and own-app anti-debug checks
  • Advanced automation - bundled adb-lookup, adb-methods, adb-block, vmove, and fview commands, allocation histories, remote debugging, DAP/MCP, custom breakpoint resolvers, scripted processes, and thread plans
  • Tracing - breakpoint tracers, stop hooks, the unified log (log stream, log show), thread info with activities, DTrace clause anatomy, the objc, pid, and syscall providers, aggregations, static probes, recursion-aware correlation, process stopping, and bounded memory-change experiments
  • Playbooks - 18 recipes, including hang sampling and closed-source framework investigation: fix a constant live, test a one-line fix, feed test data, find who changes a label, who dismissed a controller, a tap that does nothing, a value with no setter, stub or skip, reproduce from a crash report, memory growth, po failures, Apple code without source, attach instead of rebuild, hot loops, prototype layout, drive LLDB from a terminal
  • Anti-patterns - the mistakes that burn the most time, grouped by workflow, printing, breakpoints, flow control, UI, memory, crashes, and scripts

Installing

You can install this skill into Claude Code, Codex, Gemini, Cursor, and more by using npx:

npx skills add https://github.com/n0an/Apple-Debugging-Agent-Skill --skill apple-debugging

If you get the error npx: command not found, you do not have Node installed. Install it through Homebrew (use Node.js 22.23.4+, 24.22.1+, or 26.12.1+; older releases ship a certificate bundle that is no longer trusted):

brew install node

And if that fails it usually means you need to install Homebrew first.

When using npx, you can select exactly which agents you want to use during the installation. You can also select whether the skill should be installed just for one project, or whether it should be made available for all your projects.

Alternative install methods

Claude Code:

/plugin install n0an/Apple-Debugging-Agent-Skill

Gemini:

gemini extensions install https://github.com/n0an/Apple-Debugging-Agent-Skill.git --consent

Alternatively, you can clone this whole repository and install it however you want.

Using Apple Debugging

The skill is called Apple Debugging, and can be triggered in various ways. For example, in Claude Code you would use this:

/apple-debugging

And in Codex you would use this:

$apple-debugging

In both cases you can provide specific instructions. For example, /apple-debugging the Pay button ignores taps on the checkout screen on Claude, or $apple-debugging here is a crash report, find the cause in Codex.

You can also trigger the skill using natural language:

Use the Apple Debugging skill to find out why the price label shows 0 after refresh.

The skill works in two modes. When the agent has a terminal and the app runs in the Simulator or on the Mac, it attaches with xcrun lldb in batch mode and runs the commands itself. When you are driving Xcode, it gives you exact console commands one step at a time and tells you what to expect. It never attaches a second debugger to a process Xcode already owns.

Why Use an Agent Skill for Debugging?

Agents default to the slowest loop there is: add a print, rebuild, reproduce, read, repeat. They also tend to:

  • Use po for everything in Swift and give up when the expression evaluator fails, even though frame variable would have answered instantly
  • Paste a raw address into a Swift expression and conclude the object is gone
  • Create a symbolic breakpoint on a method the class never overrides, and wait forever
  • Drag the instruction pointer or thread jump across initialization and corrupt the process
  • Change a view from the console and conclude it did not work because nothing flushed Core Animation
  • Symbolicate a crash with a dSYM from a different build
  • Set a regex breakpoint across all of UIKit on a device and stall the session

This skill:

  • Prefers the live process over a rebuild: mutate, inject, stub, verify, then edit source once and confirm it in a clean run
  • Picks the right print command (v, p, po, expression -l) and the right language context every time
  • Covers the whole toolbox: breakpoints with actions, watchpoints, the view debugger, the memory graph, crash symbolication, Python commands, DTrace
  • Gives recipes, not only commands, for the situations that actually come up
  • Knows how an agent should drive LLDB non-interactively: what ends a batch early, how to give a trace a deadline on stock macOS, and what happens to the process when LLDB exits

WWDC sessions behind the material: WWDC18 412 "Advanced Debugging with Xcode and LLDB", WWDC18 416 "iOS Memory Deep Dive", WWDC19 429 "LLDB: Beyond po", WWDC21 10209 "Discover breakpoint improvements", WWDC21 10211 "Symbolication: Beyond the basics", WWDC22 110370 "Debug Swift debugging with LLDB", WWDC24 10198 "Run, Break, Inspect: Explore effective debugging in LLDB".

Contributing

Contributions are welcome - whether adding new recipes, fixing a command that changed in a newer Xcode, or correcting typos.

  • Keep Markdown concise. There is a token cost to using skills, so respect the token budgets of users.
  • Do not repeat things LLMs already know. Focus on edge cases, surprises, and common mistakes.
  • Validate changed commands on the relevant debugger and platform, and identify examples that have only been checked against documentation.
  • All work must be licensed under the MIT license.

License

Available under the MIT License, which permits commercial use, modification, distribution, and private use.

About

Agent skill that debugs iOS, macOS, watchOS, tvOS, and visionOS apps with LLDB and Xcode: breakpoints, live state inspection and mutation, view debugging, watchpoints, memory, crash symbolication, custom LLDB commands, and DTrace

Resources

Readme
MIT license
Activity

Stars

3 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.