跳到主要内容
XcodeDebuggingLabEvidence-first Xcode practice
Public · v1Hands-on Xcode debugging system

从症状到证据,
真正操作一次 Xcode。

不是把 Debug Memory Graph、View Hierarchy、backtrace 和 LLDB 写成名词表,而是先预测,再运行真实代码,在 Xcode 里取得证据、做负控并恢复现场。

A public, evidence-first laboratory for breakpoints, stacks, LLDB, UIKit inspection, memory debugging, sanitizers, Instruments, Scheme actions, testing, and postmortem symbolication.

  • Capabilities338能力事实账本LabCatalog
  • Scenarios52真实实战场景P2 fixtures
  • Schemes33安全 / 诊断 / opt-inshared
  • Evidence records2不会把实现冒充掌握Evidence

Recommended route

一次只学一条最小链。

先完成五条主线,再进入 85 项高级或外部能力。每条路线都从 App 的真实 fixture 出发,详细说明留在场景文档。

01 · Debugger

断点、变量与三种堆栈

建立 stop reason、frame、thread、queue、task 和 process 的统一坐标。

B01 → B07 → B10 → B11
02 · UI

View Hierarchy 与布局剖析

用四种不可见视图、constraint、transform、layer 和 Accessibility 做正负对照。

C01 → C02 → C03 → C04
03 · Memory

对象图、分配、泄漏与 VM

从 retain cycle 进入 Allocations、Leaks、malloc history 与离线 memgraph。

D01 → D02 → D03 → D06
04 · Runtime

Crash 与 Sanitizer

在显式危险 Scheme 中观察 signal、ASan、TSan、UBSan、Zombie 和语言异常。

D07 → D17
05 · Workflow

Scheme、测试与产物

练参数、Action、Profile、Analyze、Archive、Test Plan、xcresult 与固定 binary。

A03 → A10 → E01 → E03
06 · Instruments

日志、Gauges 与系统工作量

用同一组有界 CPU、文件、网络和 Signpost 输入对照多个工具。

F01 → F05

Real operation screenshots

真实操作截图,按场景长期保存。

截图由 Xcode/Simulator 实际界面产生,并登记 surface 与证据等级。它们帮助复现操作,但标记为 transient 时不冒充 V1/V2。

截图保存规范见 Screenshot Workflow ↗。

Scenario catalog

52 个场景,先搜症状再选工具。

目录由 LabCatalog 自动导出;每张卡直接进入完整实操文档和真实源码,不在网页复制数百行教程。

正在读取目录…

正在读取场景目录…

Evidence, not decoration

Evidence 不是装饰。

实现 P2、自动验证 V1、真实 GUI/设备 V2 是三件不同的事。网页公开当前事实,也公开尚未完成的门禁。

Implementation

52 个场景都有 fixture、Scheme、操作步骤、预期证据、Reset 和“不证明什么”。

Execution

只有可追踪的截图、日志、trace、xcresult 或 memgraph 才能写入 Evidence 账本。

Hard gates

真机、Organizer、TestFlight、MetricKit、特定硬件和部分 Xcode GUI 不用模拟结果代替。

Recovery

危险场景必须从独立 opt-in Scheme 进入,并提供 Stop、Reset 或 relaunch 路径。

网站绿色不等于你会调试;能从未知症状选工具、读证据并解释根因,才算掌握。

Run locally

从 B01 开始第一次实战。

需要 macOS、Xcode 26.2、Swift 6.2 与 iOS 17+ Simulator。

git clone https://github.com/estelledc/XcodeDebuggingLab.git
cd XcodeDebuggingLab
make check
open XcodeDebuggingLab.xcodeproj

# 默认选择 DebugLab-Safe
# 第一课:B01 → Run → 设置断点