[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6E6EX8ZJ5N51C3ZPY9PERKZ":3,"skill-same:01M6E6EX8ZJ5N51C3ZPY9PERKZ":59},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":31,"linkOnly":32,"markdownContent":33,"markdownBody":34,"frontMatter":35,"refName":36,"commitSha":37,"skillDirectory":38,"forksCount":39,"repositoryHtmlUrl":40,"repositoryHomepageUrl":41,"ownerHtmlUrl":42,"ownerBlogUrl":6,"ownerDescription":43,"updatedAt":44,"install":45,"resources":58},"01M6E6EX8ZJ5N51C3ZPY9PERKZ","axiom-lldb-ref",null,"Complete LLDB command reference — variable inspection, breakpoints, threads, expression evaluation, process control, memory commands, and .lldbinit customization","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002FCharlesWiltgen\u002FAxiom\u002Faxiom-lldb-ref\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30],"axiom lldb ref","memory","Evaluation","command","customization","process","reference","commands","control","complete","expression","process control","2026-11-10 10:12:30",false,"---\nname: axiom-lldb-ref\ndescription: Complete LLDB command reference — variable inspection, breakpoints, threads, expression evaluation, process control, memory commands, and .lldbinit customization\nlicense: MIT\n---\n\n# LLDB Command Reference\n\nComplete command reference for LLDB in Xcode. Organized by task so you can find the exact command you need.\n\nFor debugging workflows and decision trees, see `\u002Fskill axiom-lldb`.\n\n---\n\n## Part 1: Variable Inspection\n\n### `v` \u002F `frame variable`\n\nReads memory directly. No compilation. Most reliable for Swift values.\n\n```\n(lldb) v                              # All variables in current frame\n(lldb) v self                         # Self in current context\n(lldb) v self.propertyName            # Specific property\n(lldb) v localVariable                # Local variable\n(lldb) v self.array[0]               # Collection element\n(lldb) v self._showDetails            # SwiftUI @State backing store (underscore prefix)\n```\n\n**Flags:**\n\n| Flag | Effect |\n|------|--------|\n| `-d run` | Run dynamic type resolution (slower but more accurate) |\n| `-T` | Show types |\n| `-R` | Show raw (unformatted) output |\n| `-D N` | Limit depth of nested types to N levels |\n| `-P N` | Limit pointer depth to N levels |\n| `-F` | Flat output (no hierarchy) |\n\n**Limitations:** Cannot evaluate expressions, computed properties, or function calls. Use `p` for those.\n\n### `p` \u002F `expression` (with format)\n\nCompiles and executes an expression. Shows formatted result.\n\n```\n(lldb) p self.computedProperty\n(lldb) p items.count\n(lldb) p someFunction()\n(lldb) p String(describing: someValue)\n(lldb) p (1...10).map { $0 * 2 }\n```\n\nResult stored in numbered variables:\n\n```\n(lldb) p someValue\n$R0 = 42\n(lldb) p $R0 + 10\n$R1 = 52\n```\n\n### `po` \u002F `expression --object-description`\n\nCalls `debugDescription` (or `description`) on the result.\n\n```\n(lldb) po myObject\n(lldb) po error\n(lldb) po notification.userInfo\n(lldb) po NSHomeDirectory()\n```\n\n**When `po` adds value:** Classes with `CustomDebugStringConvertible`, `NSError`, `NSNotification`, collections of objects.\n\n**When `po` fails:** Swift structs without `CustomDebugStringConvertible`, protocol-typed values (use `v` instead — it performs iterative dynamic type resolution that `po` doesn't).\n\n### `expression` (full form)\n\nFull expression evaluation with all options.\n\n```\n(lldb) expression self.view.backgroundColor = UIColor.red\n(lldb) expression self.debugFlag = true\n(lldb) expression myArray.append(\"test\")\n(lldb) expression CATransaction.flush()           # Force UI update\n(lldb) expression Self._printChanges()             # SwiftUI debug\n```\n\n**Flags:**\n\n| Flag | Effect |\n|------|--------|\n| `-l objc` | Evaluate as Objective-C |\n| `-l swift` | Evaluate as Swift (default) |\n| `-O` | Object description (same as `po`) |\n| `-i false` | Stop on breakpoints hit during evaluation (default: ignore) |\n| `--` | Separator between flags and expression |\n\n**ObjC expressions for Swift debugging:**\n\n```\n(lldb) expr -l objc -- (void)[[[UIApplication sharedApplication] keyWindow] recursiveDescription]\n(lldb) expr -l objc -- (void)[CATransaction flush]\n(lldb) expr -l objc -- (int)[[UIApplication sharedApplication] _isForeground]\n```\n\n### `register read`\n\nLow-level register inspection:\n\n```\n(lldb) register read\n(lldb) register read x0 x1                # Specific registers (ARM64)\n(lldb) register read --all                # All register sets\n```\n\n---\n\n## Part 2: Breakpoints\n\n### Setting Breakpoints\n\n```\n(lldb) breakpoint set -f File.swift -l 42                # File + line\n(lldb) b File.swift:42                                    # Short form\n(lldb) breakpoint set -n methodName                       # By function name\n(lldb) breakpoint set -n \"MyClass.myMethod\"               # Qualified name\n(lldb) breakpoint set -S layoutSubviews                   # ObjC selector\n(lldb) breakpoint set -r \"viewDid.*\"                      # Regex on name\n(lldb) breakpoint set -a 0x100abc123                      # Memory address\n```\n\n### Conditional Breakpoints\n\n```\n(lldb) breakpoint set -f File.swift -l 42 -c \"value == nil\"\n(lldb) breakpoint set -f File.swift -l 42 -c \"index > 100\"\n(lldb) breakpoint set -f File.swift -l 42 -c 'name == \"test\"'\n```\n\n### Ignore Count\n\n```\n(lldb) breakpoint set -f File.swift -l 42 -i 50          # Skip first 50 hits\n```\n\n### One-Shot Breakpoints\n\n```\n(lldb) breakpoint set -f File.swift -l 42 -o             # Delete after first hit\n```\n\n### Breakpoint Commands (Logpoints)\n\nAdd commands that execute when breakpoint hits:\n\n```\n(lldb) breakpoint command add 1\n> v self.state\n> p self.items.count\n> continue\n> DONE\n```\n\nOr in one line:\n\n```\n(lldb) breakpoint command add 1 -o \"v self.state\"\n```\n\n### Exception Breakpoints\n\n```\n(lldb) breakpoint set -E swift                            # All Swift errors\n(lldb) breakpoint set -E objc                             # All ObjC exceptions\n# Filtering by exception name requires Xcode's GUI (Edit Breakpoint → Exception field)\n```\n\n### Symbolic Breakpoints\n\n```\n(lldb) breakpoint set -n UIViewAlertForUnsatisfiableConstraints    # Auto Layout\n(lldb) breakpoint set -n \"-[UIApplication _run]\"                    # App launch\n(lldb) breakpoint set -n swift_willThrow                            # Swift throw\n```\n\n### Managing Breakpoints\n\n```\n(lldb) breakpoint list                     # List all\n(lldb) breakpoint list -b                  # Brief format\n(lldb) breakpoint enable 3                 # Enable breakpoint 3\n(lldb) breakpoint disable 3                # Disable breakpoint 3\n(lldb) breakpoint delete 3                 # Delete breakpoint 3\n(lldb) breakpoint delete                   # Delete ALL (asks confirmation)\n(lldb) breakpoint modify 3 -c \"x > 10\"    # Add condition to existing\n```\n\n### Watchpoints\n\nBreak when a variable's memory changes:\n\n```\n(lldb) watchpoint set variable self.count                  # Watch for write\n(lldb) watchpoint set variable -w read_write myGlobal      # Watch for read or write\n(lldb) watchpoint set expression -- &myVariable            # Watch memory address\n(lldb) watchpoint list                                     # List all\n(lldb) watchpoint delete 1                                 # Delete watchpoint 1\n(lldb) watchpoint modify 1 -c \"self.count > 10\"            # Add condition\n```\n\n**Note:** Hardware watchpoints are limited (~4 per process). Use sparingly.\n\n---\n\n## Part 3: Thread & Backtrace\n\n### Backtraces\n\n```\n(lldb) bt                              # Current thread backtrace\n(lldb) bt 10                           # Limit to 10 frames\n(lldb) bt all                          # All threads\n(lldb) thread backtrace all            # Same as bt all\n```\n\n### Thread Navigation\n\n```\n(lldb) thread list                     # List all threads with state\n(lldb) thread info                     # Current thread details + stop reason\n(lldb) thread select 3                 # Switch to thread 3\n```\n\n### Frame Navigation\n\n```\n(lldb) frame info                      # Current frame details\n(lldb) frame select 5                  # Jump to frame 5\n(lldb) up                              # Go up one frame (toward caller)\n(lldb) down                            # Shortcut: go down one frame\n```\n\n### Thread Return (Skip Code)\n\nForce an early return from the current function:\n\n```\n(lldb) thread return                   # Return void\n(lldb) thread return 42                # Return specific value\n```\n\n**Use with caution** — skips cleanup code, can leave state inconsistent.\n\n---\n\n## Part 4: Expression Evaluation\n\n### Swift Expressions\n\n```\n(lldb) expr let x = 42; print(x)\n(lldb) expr self.view.backgroundColor = UIColor.red\n(lldb) expr UIApplication.shared.windows.first?.rootViewController\n(lldb) expr UserDefaults.standard.set(true, forKey: \"debug\")\n```\n\n### Objective-C Expressions\n\nSwitch to ObjC when Swift expression parser fails:\n\n```\n(lldb) expr -l objc -- (void)[CATransaction flush]\n(lldb) expr -l objc -- (id)[[UIApplication sharedApplication] keyWindow]\n(lldb) expr -l objc -- (void)[[NSNotificationCenter defaultCenter] postNotificationName:@\"test\" object:nil]\n```\n\n### UI Debugging Expressions\n\n```\n(lldb) expr -l objc -- (void)[[[UIApplication sharedApplication] keyWindow] recursiveDescription]\n(lldb) po UIApplication.shared.windows.first?.rootViewController?.view.recursiveDescription()\n```\n\n### SwiftUI Debugging\n\n```\n(lldb) expr Self._printChanges()                # Print what triggered body re-eval (inside view body only)\n```\n\n### Runtime Type Information\n\n```\n(lldb) expr type(of: someValue)\n(lldb) expr String(describing: type(of: someValue))\n```\n\n---\n\n## Part 5: Process Control\n\n### Execution Control\n\n```\n(lldb) continue                        # Resume execution (c)\n(lldb) c                               # Short form\n(lldb) process interrupt               # Pause running process\n(lldb) thread step-over                # Step over (n \u002F next)\n(lldb) n                               # Short form\n(lldb) thread step-in                  # Step into (s \u002F step)\n(lldb) s                               # Short form\n(lldb) thread step-out                 # Step out (finish)\n(lldb) finish                          # Short form\n(lldb) thread step-inst                # Step one instruction (assembly-level)\n(lldb) ni                              # Step over one instruction\n```\n\n### Process Management\n\n```\n(lldb) process launch                  # Launch\u002Frestart\n(lldb) process attach --pid 1234       # Attach to running process\n(lldb) process attach --name MyApp     # Attach by name\n(lldb) process detach                  # Detach without killing\n(lldb) kill                            # Kill debugged process\n```\n\n---\n\n## Part 6: Memory & Image\n\n### Memory Reading\n\n```\n(lldb) memory read 0x100abc123                    # Read memory at address\n(lldb) memory read -c 64 0x100abc123              # Read 64 bytes\n(lldb) memory read -f x 0x100abc123               # Format as hex\n(lldb) memory read -f s 0x100abc123               # Format as string\n```\n\n### Memory Search\n\n```\n(lldb) memory find -s \"searchString\" -- 0x100000000 0x200000000\n```\n\n### Image\u002FModule Inspection\n\n```\n(lldb) image lookup -a 0x100abc123                # Lookup symbol at address\n(lldb) image lookup -n myFunction                 # Find function by name\n(lldb) image lookup -rn \"MyClass.*\"               # Regex search\n(lldb) image list                                 # List all loaded images\u002Fframeworks\n(lldb) image list -b                              # Brief format\n```\n\n**Common use:** Finding which framework a crash address belongs to:\n\n```\n(lldb) image lookup -a 0x1a2b3c4d5\n```\n\n---\n\n## Part 7: .lldbinit & Customization\n\n### File Location\n\nLLDB reads `~\u002F.lldbinit` at startup. Per-project init files are also supported when configured in Xcode's scheme settings.\n\n### Useful Aliases\n\nAdd to `~\u002F.lldbinit`:\n\n```\n# Quick reload — flush UI changes made via expression\ncommand alias flush expr -l objc -- (void)[CATransaction flush]\n\n# Print view hierarchy\ncommand alias views expr -l objc -- (void)[[[UIApplication sharedApplication] keyWindow] recursiveDescription]\n\n# Print auto layout constraints\ncommand alias constraints po [[UIWindow keyWindow] _autolayoutTrace]\n```\n\n### Custom Type Summaries\n\n```\n# Show CLLocationCoordinate2D as \"lat, lon\"\ntype summary add CLLocationCoordinate2D --summary-string \"${var.latitude}, ${var.longitude}\"\n```\n\n### Settings\n\n```\n(lldb) settings show target.language              # Current language\n(lldb) settings set target.language swift          # Force Swift mode\n(lldb) settings set target.max-children-count 100  # Show more collection items\n```\n\n### Per-Project .lldbinit\n\nIn Xcode: Edit Scheme → Run → Options → \"LLDB Init File\" field.\n\nPut project-specific aliases and breakpoints in a `.lldbinit` file in your project root.\n\n---\n\n## Part 8: Troubleshooting LLDB Itself\n\n### \"expression failed to parse\"\n\n**Cause:** Swift expression parser can't resolve types from the current module.\n\n**Fixes:**\n1. Use `v` instead (no compilation needed)\n2. Simplify the expression\n3. Try `expr -l objc -- ...` for ObjC-bridge types\n4. Clean derived data and rebuild\n\n### \"variable not available\"\n\n**Cause:** Compiler optimized the variable out.\n\n**Fixes:**\n1. Switch to Debug build configuration\n2. Set `-Onone` for the specific file (Build Settings → per-file compiler flags)\n3. Use `register read` to check if the value is in a register\n\n### \"wrong language mode\"\n\n**Cause:** LLDB defaults to ObjC in some contexts (especially in frameworks).\n\n**Fix:**\n```\n(lldb) settings set target.language swift\n(lldb) expr -l swift -- mySwiftExpression\n```\n\n### \"expression caused a crash\"\n\n**Cause:** The expression you evaluated had a side effect that crashed.\n\n**Fix:**\n1. Don't evaluate expressions that modify state unless you intend to\n2. Use `v` for read-only inspection\n3. If the crash corrupted state, restart the debug session\n\n### LLDB Hangs or Is Slow\n\n**Cause:** Usually compiling a complex expression or resolving types in a large project.\n\n**Fix:**\n1. Use `v` instead of `p`\u002F`po` (no compilation)\n2. Reduce expression complexity\n3. If LLDB hangs during `po`, Ctrl+C to cancel and use `v` instead\n\n### Breakpoint Not Hit\n\n**Causes and fixes:**\n\n| Cause | Fix |\n|-------|-----|\n| Wrong file\u002Fline (code moved) | Re-set breakpoint on current code |\n| Breakpoint disabled | `breakpoint enable N` |\n| Code not executed | Verify the code path is reached |\n| Optimized out (Release) | Switch to Debug configuration |\n| In a framework\u002FSPM package | Set symbolic breakpoint by function name |\n\n---\n\n## Resources\n\n**WWDC**: 2019-429, 2018-412, 2022-110370, 2015-402\n\n**Docs**: \u002Fxcode\u002Fstepping-through-code-and-inspecting-variables-to-isolate-bugs, \u002Fxcode\u002Fsetting-breakpoints-to-pause-your-running-app\n\n**Skills**: axiom-lldb, axiom-xcode-debugging\n\n","# LLDB Command Reference\n\nComplete command reference for LLDB in Xcode. Organized by task so you can find the exact command you need.\n\nFor debugging workflows and decision trees, see `\u002Fskill axiom-lldb`.\n\n---\n\n## Part 1: Variable Inspection\n\n### `v` \u002F `frame variable`\n\nReads memory directly. No compilation. Most reliable for Swift values.\n\n```\n(lldb) v                              # All variables in current frame\n(lldb) v self                         # Self in current context\n(lldb) v self.propertyName            # Specific property\n(lldb) v localVariable                # Local variable\n(lldb) v self.array[0]               # Collection element\n(lldb) v self._showDetails            # SwiftUI @State backing store (underscore prefix)\n```\n\n**Flags:**\n\n| Flag | Effect |\n|------|--------|\n| `-d run` | Run dynamic type resolution (slower but more accurate) |\n| `-T` | Show types |\n| `-R` | Show raw (unformatted) output |\n| `-D N` | Limit depth of nested types to N levels |\n| `-P N` | Limit pointer depth to N levels |\n| `-F` | Flat output (no hierarchy) |\n\n**Limitations:** Cannot evaluate expressions, computed properties, or function calls. Use `p` for those.\n\n### `p` \u002F `expression` (with format)\n\nCompiles and executes an expression. Shows formatted result.\n\n```\n(lldb) p self.computedProperty\n(lldb) p items.count\n(lldb) p someFunction()\n(lldb) p String(describing: someValue)\n(lldb) p (1...10).map { $0 * 2 }\n```\n\nResult stored in numbered variables:\n\n```\n(lldb) p someValue\n$R0 = 42\n(lldb) p $R0 + 10\n$R1 = 52\n```\n\n### `po` \u002F `expression --object-description`\n\nCalls `debugDescription` (or `description`) on the result.\n\n```\n(lldb) po myObject\n(lldb) po error\n(lldb) po notification.userInfo\n(lldb) po NSHomeDirectory()\n```\n\n**When `po` adds value:** Classes with `CustomDebugStringConvertible`, `NSError`, `NSNotification`, collections of objects.\n\n**When `po` fails:** Swift structs without `CustomDebugStringConvertible`, protocol-typed values (use `v` instead — it performs iterative dynamic type resolution that `po` doesn't).\n\n### `expression` (full form)\n\nFull expression evaluation with all options.\n\n```\n(lldb) expression self.view.backgroundColor = UIColor.red\n(lldb) expression self.debugFlag = true\n(lldb) expression myArray.append(\"test\")\n(lldb) expression CATransaction.flush()           # Force UI update\n(lldb) expression Self._printChanges()             # SwiftUI debug\n```\n\n**Flags:**\n\n| Flag | Effect |\n|------|--------|\n| `-l objc` | Evaluate as Objective-C |\n| `-l swift` | Evaluate as Swift (default) |\n| `-O` | Object description (same as `po`) |\n| `-i false` | Stop on breakpoints hit during evaluation (default: ignore) |\n| `--` | Separator between flags and expression |\n\n**ObjC expressions for Swift debugging:**\n\n```\n(lldb) expr -l objc -- (void)[[[UIApplication sharedApplication] keyWindow] recursiveDescription]\n(lldb) expr -l objc -- (void)[CATransaction flush]\n(lldb) expr -l objc -- (int)[[UIApplication sharedApplication] _isForeground]\n```\n\n### `register read`\n\nLow-level register inspection:\n\n```\n(lldb) register read\n(lldb) register read x0 x1                # Specific registers (ARM64)\n(lldb) register read --all                # All register sets\n```\n\n---\n\n## Part 2: Breakpoints\n\n### Setting Breakpoints\n\n```\n(lldb) breakpoint set -f File.swift -l 42                # File + line\n(lldb) b File.swift:42                                    # Short form\n(lldb) breakpoint set -n methodName                       # By function name\n(lldb) breakpoint set -n \"MyClass.myMethod\"               # Qualified name\n(lldb) breakpoint set -S layoutSubviews                   # ObjC selector\n(lldb) breakpoint set -r \"viewDid.*\"                      # Regex on name\n(lldb) breakpoint set -a 0x100abc123                      # Memory address\n```\n\n### Conditional Breakpoints\n\n```\n(lldb) breakpoint set -f File.swift -l 42 -c \"value == nil\"\n(lldb) breakpoint set -f File.swift -l 42 -c \"index > 100\"\n(lldb) breakpoint set -f File.swift -l 42 -c 'name == \"test\"'\n```\n\n### Ignore Count\n\n```\n(lldb) breakpoint set -f File.swift -l 42 -i 50          # Skip first 50 hits\n```\n\n### One-Shot Breakpoints\n\n```\n(lldb) breakpoint set -f File.swift -l 42 -o             # Delete after first hit\n```\n\n### Breakpoint Commands (Logpoints)\n\nAdd commands that execute when breakpoint hits:\n\n```\n(lldb) breakpoint command add 1\n> v self.state\n> p self.items.count\n> continue\n> DONE\n```\n\nOr in one line:\n\n```\n(lldb) breakpoint command add 1 -o \"v self.state\"\n```\n\n### Exception Breakpoints\n\n```\n(lldb) breakpoint set -E swift                            # All Swift errors\n(lldb) breakpoint set -E objc                             # All ObjC exceptions\n# Filtering by exception name requires Xcode's GUI (Edit Breakpoint → Exception field)\n```\n\n### Symbolic Breakpoints\n\n```\n(lldb) breakpoint set -n UIViewAlertForUnsatisfiableConstraints    # Auto Layout\n(lldb) breakpoint set -n \"-[UIApplication _run]\"                    # App launch\n(lldb) breakpoint set -n swift_willThrow                            # Swift throw\n```\n\n### Managing Breakpoints\n\n```\n(lldb) breakpoint list                     # List all\n(lldb) breakpoint list -b                  # Brief format\n(lldb) breakpoint enable 3                 # Enable breakpoint 3\n(lldb) breakpoint disable 3                # Disable breakpoint 3\n(lldb) breakpoint delete 3                 # Delete breakpoint 3\n(lldb) breakpoint delete                   # Delete ALL (asks confirmation)\n(lldb) breakpoint modify 3 -c \"x > 10\"    # Add condition to existing\n```\n\n### Watchpoints\n\nBreak when a variable's memory changes:\n\n```\n(lldb) watchpoint set variable self.count                  # Watch for write\n(lldb) watchpoint set variable -w read_write myGlobal      # Watch for read or write\n(lldb) watchpoint set expression -- &myVariable            # Watch memory address\n(lldb) watchpoint list                                     # List all\n(lldb) watchpoint delete 1                                 # Delete watchpoint 1\n(lldb) watchpoint modify 1 -c \"self.count > 10\"            # Add condition\n```\n\n**Note:** Hardware watchpoints are limited (~4 per process). Use sparingly.\n\n---\n\n## Part 3: Thread & Backtrace\n\n### Backtraces\n\n```\n(lldb) bt                              # Current thread backtrace\n(lldb) bt 10                           # Limit to 10 frames\n(lldb) bt all                          # All threads\n(lldb) thread backtrace all            # Same as bt all\n```\n\n### Thread Navigation\n\n```\n(lldb) thread list                     # List all threads with state\n(lldb) thread info                     # Current thread details + stop reason\n(lldb) thread select 3                 # Switch to thread 3\n```\n\n### Frame Navigation\n\n```\n(lldb) frame info                      # Current frame details\n(lldb) frame select 5                  # Jump to frame 5\n(lldb) up                              # Go up one frame (toward caller)\n(lldb) down                            # Shortcut: go down one frame\n```\n\n### Thread Return (Skip Code)\n\nForce an early return from the current function:\n\n```\n(lldb) thread return                   # Return void\n(lldb) thread return 42                # Return specific value\n```\n\n**Use with caution** — skips cleanup code, can leave state inconsistent.\n\n---\n\n## Part 4: Expression Evaluation\n\n### Swift Expressions\n\n```\n(lldb) expr let x = 42; print(x)\n(lldb) expr self.view.backgroundColor = UIColor.red\n(lldb) expr UIApplication.shared.windows.first?.rootViewController\n(lldb) expr UserDefaults.standard.set(true, forKey: \"debug\")\n```\n\n### Objective-C Expressions\n\nSwitch to ObjC when Swift expression parser fails:\n\n```\n(lldb) expr -l objc -- (void)[CATransaction flush]\n(lldb) expr -l objc -- (id)[[UIApplication sharedApplication] keyWindow]\n(lldb) expr -l objc -- (void)[[NSNotificationCenter defaultCenter] postNotificationName:@\"test\" object:nil]\n```\n\n### UI Debugging Expressions\n\n```\n(lldb) expr -l objc -- (void)[[[UIApplication sharedApplication] keyWindow] recursiveDescription]\n(lldb) po UIApplication.shared.windows.first?.rootViewController?.view.recursiveDescription()\n```\n\n### SwiftUI Debugging\n\n```\n(lldb) expr Self._printChanges()                # Print what triggered body re-eval (inside view body only)\n```\n\n### Runtime Type Information\n\n```\n(lldb) expr type(of: someValue)\n(lldb) expr String(describing: type(of: someValue))\n```\n\n---\n\n## Part 5: Process Control\n\n### Execution Control\n\n```\n(lldb) continue                        # Resume execution (c)\n(lldb) c                               # Short form\n(lldb) process interrupt               # Pause running process\n(lldb) thread step-over                # Step over (n \u002F next)\n(lldb) n                               # Short form\n(lldb) thread step-in                  # Step into (s \u002F step)\n(lldb) s                               # Short form\n(lldb) thread step-out                 # Step out (finish)\n(lldb) finish                          # Short form\n(lldb) thread step-inst                # Step one instruction (assembly-level)\n(lldb) ni                              # Step over one instruction\n```\n\n### Process Management\n\n```\n(lldb) process launch                  # Launch\u002Frestart\n(lldb) process attach --pid 1234       # Attach to running process\n(lldb) process attach --name MyApp     # Attach by name\n(lldb) process detach                  # Detach without killing\n(lldb) kill                            # Kill debugged process\n```\n\n---\n\n## Part 6: Memory & Image\n\n### Memory Reading\n\n```\n(lldb) memory read 0x100abc123                    # Read memory at address\n(lldb) memory read -c 64 0x100abc123              # Read 64 bytes\n(lldb) memory read -f x 0x100abc123               # Format as hex\n(lldb) memory read -f s 0x100abc123               # Format as string\n```\n\n### Memory Search\n\n```\n(lldb) memory find -s \"searchString\" -- 0x100000000 0x200000000\n```\n\n### Image\u002FModule Inspection\n\n```\n(lldb) image lookup -a 0x100abc123                # Lookup symbol at address\n(lldb) image lookup -n myFunction                 # Find function by name\n(lldb) image lookup -rn \"MyClass.*\"               # Regex search\n(lldb) image list                                 # List all loaded images\u002Fframeworks\n(lldb) image list -b                              # Brief format\n```\n\n**Common use:** Finding which framework a crash address belongs to:\n\n```\n(lldb) image lookup -a 0x1a2b3c4d5\n```\n\n---\n\n## Part 7: .lldbinit & Customization\n\n### File Location\n\nLLDB reads `~\u002F.lldbinit` at startup. Per-project init files are also supported when configured in Xcode's scheme settings.\n\n### Useful Aliases\n\nAdd to `~\u002F.lldbinit`:\n\n```\n# Quick reload — flush UI changes made via expression\ncommand alias flush expr -l objc -- (void)[CATransaction flush]\n\n# Print view hierarchy\ncommand alias views expr -l objc -- (void)[[[UIApplication sharedApplication] keyWindow] recursiveDescription]\n\n# Print auto layout constraints\ncommand alias constraints po [[UIWindow keyWindow] _autolayoutTrace]\n```\n\n### Custom Type Summaries\n\n```\n# Show CLLocationCoordinate2D as \"lat, lon\"\ntype summary add CLLocationCoordinate2D --summary-string \"${var.latitude}, ${var.longitude}\"\n```\n\n### Settings\n\n```\n(lldb) settings show target.language              # Current language\n(lldb) settings set target.language swift          # Force Swift mode\n(lldb) settings set target.max-children-count 100  # Show more collection items\n```\n\n### Per-Project .lldbinit\n\nIn Xcode: Edit Scheme → Run → Options → \"LLDB Init File\" field.\n\nPut project-specific aliases and breakpoints in a `.lldbinit` file in your project root.\n\n---\n\n## Part 8: Troubleshooting LLDB Itself\n\n### \"expression failed to parse\"\n\n**Cause:** Swift expression parser can't resolve types from the current module.\n\n**Fixes:**\n1. Use `v` instead (no compilation needed)\n2. Simplify the expression\n3. Try `expr -l objc -- ...` for ObjC-bridge types\n4. Clean derived data and rebuild\n\n### \"variable not available\"\n\n**Cause:** Compiler optimized the variable out.\n\n**Fixes:**\n1. Switch to Debug build configuration\n2. Set `-Onone` for the specific file (Build Settings → per-file compiler flags)\n3. Use `register read` to check if the value is in a register\n\n### \"wrong language mode\"\n\n**Cause:** LLDB defaults to ObjC in some contexts (especially in frameworks).\n\n**Fix:**\n```\n(lldb) settings set target.language swift\n(lldb) expr -l swift -- mySwiftExpression\n```\n\n### \"expression caused a crash\"\n\n**Cause:** The expression you evaluated had a side effect that crashed.\n\n**Fix:**\n1. Don't evaluate expressions that modify state unless you intend to\n2. Use `v` for read-only inspection\n3. If the crash corrupted state, restart the debug session\n\n### LLDB Hangs or Is Slow\n\n**Cause:** Usually compiling a complex expression or resolving types in a large project.\n\n**Fix:**\n1. Use `v` instead of `p`\u002F`po` (no compilation)\n2. Reduce expression complexity\n3. If LLDB hangs during `po`, Ctrl+C to cancel and use `v` instead\n\n### Breakpoint Not Hit\n\n**Causes and fixes:**\n\n| Cause | Fix |\n|-------|-----|\n| Wrong file\u002Fline (code moved) | Re-set breakpoint on current code |\n| Breakpoint disabled | `breakpoint enable N` |\n| Code not executed | Verify the code path is reached |\n| Optimized out (Release) | Switch to Debug configuration |\n| In a framework\u002FSPM package | Set symbolic breakpoint by function name |\n\n---\n\n## Resources\n\n**WWDC**: 2019-429, 2018-412, 2022-110370, 2015-402\n\n**Docs**: \u002Fxcode\u002Fstepping-through-code-and-inspecting-variables-to-isolate-bugs, \u002Fxcode\u002Fsetting-breakpoints-to-pause-your-running-app\n\n**Skills**: axiom-lldb, axiom-xcode-debugging\n\n",{"name":5,"license":15,"description":7},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002FCharlesWiltgen\u002FAxiom\u002Faxiom-lldb-ref",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":57},[47,50,53],{"tool":48,"command":49},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill axiom-lldb-ref",{"tool":51,"command":52},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill axiom-lldb-ref",{"tool":54,"command":55},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill axiom-lldb-ref","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002FCharlesWiltgen\u002FAxiom\u002Faxiom-lldb-ref\u002FSKILL.md",true,[],[60,74,84,93,99,106],{"skillNo":61,"name":62,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":70,"publishedAt":31},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[65],{"categoryNo":66,"categoryName":67,"taxonomyType":68,"taxonomyTypeDesc":69},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[71,72,73],"model","model hierarchy","model hierarchy skill",{"skillNo":75,"name":76,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":80,"publishedAt":31},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[79],{"categoryNo":66,"categoryName":67,"taxonomyType":68,"taxonomyTypeDesc":69},[81,82,83],"MCP","zoom","zoom mcp",{"skillNo":85,"name":86,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":31},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[90,91,92,82],"sdk","zoom apps sdk","apps",{"skillNo":94,"name":95,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":31},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[95],{"skillNo":100,"name":101,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":105,"publishedAt":31},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[104],{"categoryNo":66,"categoryName":67,"taxonomyType":68,"taxonomyTypeDesc":69},[101],{"skillNo":107,"name":108,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":31},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[108]]