mobile-debug-mcp 0.34.0 → 0.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/mcp-builder/SKILL.md +44 -64
- package/.agents/skills/mcp-builder/references/build-flags.md +44 -43
- package/.agents/skills/mcp-builder/references/diagnostics-schema.md +4 -1
- package/.agents/skills/mcp-builder/references/toolchain-details.md +49 -62
- package/.agents/skills/spec-review/references/spec-review-checklist.md +7 -0
- package/.agents/skills/test-authoring/SKILL.md +7 -6
- package/.agents/skills/test-authoring/references/repo-test-layout.md +3 -1
- package/.agents/skills/test-authoring/references/test-authoring-workflow.md +16 -7
- package/.agents/skills/test-authoring/references/test-quality-checklist.md +2 -1
- package/.cursor-plugin/marketplace.json +1 -1
- package/.github/copilot-instructions.md +14 -36
- package/.github/workflows/ci.yml +4 -4
- package/AGENTS.md +12 -3
- package/CONTRIBUTING.md +79 -0
- package/README.md +218 -129
- package/agent-plugin/.antigravity-plugin/README.md +48 -0
- package/agent-plugin/.antigravity-plugin/plugin.json +18 -0
- package/agent-plugin/.claude-plugin/plugin.json +2 -2
- package/agent-plugin/.codex-plugin/plugin.json +1 -1
- package/agent-plugin/.cursor-plugin/plugin.json +2 -2
- package/agent-plugin/.mcp.json +1 -1
- package/agent-plugin/README.md +50 -11
- package/agent-plugin/cursor/.cursor-plugin/plugin.json +23 -0
- package/agent-plugin/cursor/LICENSE +201 -0
- package/agent-plugin/cursor/README.md +9 -0
- package/agent-plugin/cursor/skills/mobile-debug-mcp/SKILL.md +253 -0
- package/agent-plugin/mcp.json +1 -1
- package/agent-plugin/mcp_config.json +13 -0
- package/agent-plugin/plugin.json +1 -1
- package/agent-plugin/skills/mobile-debug-mcp/SKILL.md +62 -17
- package/dist/contracts/execution-controls.js +24 -0
- package/dist/contracts/selector.js +8 -0
- package/dist/contracts/target.js +15 -0
- package/dist/contracts/ui.js +1 -0
- package/dist/debugger/android.js +2 -1
- package/dist/debugger/diagnostics.js +54 -0
- package/dist/debugger/guard.js +4 -4
- package/dist/debugger/ios-worker.js +62 -0
- package/dist/debugger/ios.js +57 -0
- package/dist/debugger/protocol.js +33 -0
- package/dist/debugger/sessions.js +133 -74
- package/dist/debugger/worker.js +59 -46
- package/dist/interact/adjustment/adjustment-context.js +41 -0
- package/dist/interact/adjustment/adjustment-gestures.js +55 -0
- package/dist/interact/adjustment/adjustment-plan.js +18 -0
- package/dist/interact/adjustment/adjustment-resolution.js +127 -0
- package/dist/interact/adjustment/adjustment-result.js +19 -0
- package/dist/interact/adjustment/adjustment-semantic.js +64 -0
- package/dist/interact/adjustment/adjustment-verification.js +35 -0
- package/dist/interact/adjustment/adjustment.js +52 -0
- package/dist/interact/adjustment/control-geometry.js +87 -0
- package/dist/interact/adjustment/control-values.js +136 -0
- package/dist/interact/adjustment/slider-labels.js +84 -0
- package/dist/interact/assertions/screen-assertion.js +37 -0
- package/dist/interact/assertions/state-assertion-context.js +35 -0
- package/dist/interact/assertions/state-assertion.js +76 -0
- package/dist/interact/assertions/state-comparison.js +141 -0
- package/dist/interact/assertions/visibility-assertion.js +34 -0
- package/dist/interact/conditional-action.js +12 -7
- package/dist/interact/index.js +77 -3092
- package/dist/interact/input-service.js +1 -0
- package/dist/interact/interaction-trace.js +21 -0
- package/dist/interact/model.js +1 -0
- package/dist/interact/observation.js +1 -0
- package/dist/interact/targeting/candidate-ancestor.js +58 -0
- package/dist/interact/targeting/candidate-result.js +23 -0
- package/dist/interact/targeting/candidate-scoring.js +50 -0
- package/dist/interact/targeting/element-helpers.js +216 -0
- package/dist/interact/targeting/find-element.js +65 -0
- package/dist/interact/targeting/nearby-control.js +56 -0
- package/dist/interact/targeting/resolved-elements.js +21 -0
- package/dist/interact/targeting/tap-target.js +17 -0
- package/dist/interact/targeting/target-scope.js +104 -0
- package/dist/interact/waits/legacy-log-wait.js +38 -0
- package/dist/interact/waits/legacy-wait-observations.js +103 -0
- package/dist/interact/waits/legacy-wait-state.js +34 -0
- package/dist/interact/waits/legacy-wait.js +48 -0
- package/dist/interact/waits/screen-wait.js +49 -0
- package/dist/interact/waits/ui-change-helpers.js +157 -0
- package/dist/interact/waits/ui-change-state.js +18 -0
- package/dist/interact/waits/ui-change-wait.js +77 -0
- package/dist/interact/waits/ui-wait-condition.js +56 -0
- package/dist/interact/waits/ui-wait-state.js +38 -0
- package/dist/interact/waits/ui-wait.js +106 -0
- package/dist/manage/android.js +55 -51
- package/dist/manage/index.js +38 -75
- package/dist/manage/ios/build-types.js +1 -0
- package/dist/manage/ios/build.js +210 -0
- package/dist/manage/ios/project-discovery.js +29 -0
- package/dist/manage/ios/scheme.js +18 -0
- package/dist/manage/ios.js +44 -256
- package/dist/observe/android/context.js +1 -0
- package/dist/observe/android/current-screen.js +55 -0
- package/dist/observe/android/fingerprint.js +13 -0
- package/dist/observe/android/log-stream.js +132 -0
- package/dist/observe/android/logs.js +107 -0
- package/dist/observe/android/screenshot.js +70 -0
- package/dist/observe/android/ui-tree.js +107 -0
- package/dist/observe/android.js +16 -520
- package/dist/observe/evidence.js +114 -75
- package/dist/observe/index.js +16 -263
- package/dist/observe/ios/context.js +16 -0
- package/dist/observe/ios/fingerprint.js +12 -0
- package/dist/observe/ios/log-stream.js +105 -0
- package/dist/observe/ios/logs.js +168 -0
- package/dist/observe/ios/screenshot.js +22 -0
- package/dist/observe/ios/ui-elements.js +241 -0
- package/dist/observe/ios/ui-tree.js +137 -0
- package/dist/observe/ios-trace/artifact.js +63 -0
- package/dist/observe/ios-trace/capabilities.js +86 -0
- package/dist/observe/ios-trace/native.js +93 -0
- package/dist/observe/ios-trace/notification.js +35 -0
- package/dist/observe/ios-trace/process.js +98 -0
- package/dist/observe/ios-trace/sessions.js +244 -0
- package/dist/observe/ios.js +17 -715
- package/dist/observe/logs/model.js +1 -0
- package/dist/{network → observe/network}/index.js +2 -2
- package/dist/observe/readiness-service.js +5 -3
- package/dist/observe/readiness.js +33 -14
- package/dist/observe/screenshot-encoding.js +41 -0
- package/dist/observe/snapshot-collection.js +79 -0
- package/dist/observe/snapshot-logs.js +30 -0
- package/dist/observe/snapshot-metadata.js +43 -31
- package/dist/observe/snapshot-semantic.js +115 -0
- package/dist/observe/system-trace-error.js +7 -0
- package/dist/observe/system-trace-router.js +81 -0
- package/dist/observe/system-trace.js +26 -21
- package/dist/runtime/action-results.js +270 -0
- package/dist/runtime/clock.js +4 -0
- package/dist/server/common.js +1 -256
- package/dist/server/definitions/assert.js +162 -0
- package/dist/server/definitions/diagnostic.js +118 -0
- package/dist/server/definitions/input.js +274 -0
- package/dist/server/definitions/manage.js +194 -0
- package/dist/server/definitions/observe.js +149 -0
- package/dist/server/definitions/target.js +138 -0
- package/dist/server/definitions/wait.js +105 -0
- package/dist/server/handlers/action-execution.js +163 -0
- package/dist/server/handlers/correlation.js +23 -0
- package/dist/server/handlers/debugger-handlers.js +67 -0
- package/dist/server/handlers/debugger-response.js +9 -0
- package/dist/server/handlers/diagnostic.js +77 -0
- package/dist/server/handlers/handler-types.js +1 -0
- package/dist/server/handlers/input.js +154 -0
- package/dist/server/handlers/interact.js +113 -0
- package/dist/server/handlers/journey-assertions.js +35 -0
- package/dist/server/handlers/journey.js +147 -0
- package/dist/server/handlers/manage.js +119 -0
- package/dist/server/handlers/observe.js +95 -0
- package/dist/server/handlers/payload.js +4 -0
- package/dist/server/handlers/tool-handlers.js +170 -0
- package/dist/server/schemas/condition-schema.js +2 -0
- package/dist/server/{debugger-schema.js → schemas/debugger-schema.js} +20 -12
- package/dist/server/{journey-schema.js → schemas/journey-schema.js} +7 -22
- package/dist/server/schemas/system-trace-schema.js +22 -0
- package/dist/server/tool-definitions.js +58 -1135
- package/dist/server-core.js +2 -2
- package/dist/server.js +4 -4
- package/dist/system/android-status.js +101 -0
- package/dist/system/android.js +37 -27
- package/dist/system/index.js +13 -439
- package/dist/system/ios-status.js +132 -0
- package/dist/system/ios.js +11 -8
- package/dist/system/model.js +1 -0
- package/dist/system/probes.js +105 -0
- package/dist/system/status-summary.js +43 -0
- package/dist/system/unsupported-status.js +52 -0
- package/dist/utils/android/commands.js +89 -0
- package/dist/utils/android/gradle.js +139 -0
- package/dist/utils/android/logs.js +103 -0
- package/dist/utils/android/ui-tree.js +233 -0
- package/dist/utils/android/utils.js +6 -564
- package/dist/utils/cli/idb/idb-helper.js +4 -6
- package/dist/utils/cli/idb/install-idb.js +13 -9
- package/dist/utils/cli/ios/preflight-ios.js +42 -38
- package/dist/utils/ios/utils.js +48 -46
- package/dist/utils/java.js +65 -49
- package/dist/utils/resolve-device.js +4 -2
- package/dist/utils/ui/index.js +26 -26
- package/docs/CHANGELOG.md +67 -1
- package/docs/README.md +38 -0
- package/docs/agent-plugin-installation-verification.md +39 -0
- package/docs/benchmarks/README.md +18 -0
- package/docs/benchmarks/interaction-latency/README.md +14 -0
- package/docs/benchmarks/interaction-latency/final.md +4 -1
- package/docs/benchmarks/interaction-latency/ios-validation.md +2 -0
- package/docs/benchmarks/ui-tree-performance/README.md +24 -16
- package/docs/benchmarks/ui-tree-performance/comparison.md +11 -10
- package/docs/code-structure.md +120 -0
- package/docs/specs/001-state-verification/spec.md +16 -14
- package/docs/specs/002-richer-element-identity/spec.md +12 -10
- package/docs/specs/003-wait-and-synchronization-reliability/spec.md +12 -10
- package/docs/specs/004-action-verification-routing/spec.md +3 -3
- package/docs/specs/005-unified-action-execution-and-verification-model/spec.md +2 -0
- package/docs/specs/006-runtime-action-instrumentation-and-binding-layer/spec.md +2 -0
- package/docs/specs/007-actionability-resolution-and-executable-target-selection/spec.md +3 -1
- package/docs/specs/008-adjustable-control-support-and-semantic-value-manipulation/spec.md +3 -4
- package/docs/specs/009-semantic-control-modeling-for-custom-and-composite-controls/spec.md +2 -0
- package/docs/specs/010-verification-stabilization-and-temporal-convergence/spec.md +2 -2
- package/docs/specs/011-recovery-and-replanning-for-failed-or-ambiguous-interaction-flows/spec.md +2 -2
- package/docs/specs/011.1-recovery-contract-types-and-runtime-wiring-spec/spec.md +2 -0
- package/docs/specs/012-action-trace-and-xecution-observability/spec.md +2 -3
- package/docs/specs/013-wait-and-synchronization-reliability/spec.md +19 -19
- package/docs/specs/014-actionability-resolution/spec.md +20 -18
- package/docs/specs/015-adjustable-control-support/spec.md +17 -15
- package/docs/specs/016-environment-tools/spec.md +20 -20
- package/docs/specs/018-interaction-latency-and-batched-journeys/spec.md +2 -0
- package/docs/specs/019-ui-tree-observation-performance/spec.md +3 -1
- package/docs/specs/020-conditional-actions/intent.md +5 -3
- package/docs/specs/020-conditional-actions/plan.md +8 -9
- package/docs/specs/020-conditional-actions/spec.md +4 -2
- package/docs/specs/021-app-readiness-signals/intent.md +4 -2
- package/docs/specs/021-app-readiness-signals/plan.md +7 -6
- package/docs/specs/021-app-readiness-signals/spec.md +3 -1
- package/docs/specs/022-correlated-evidence/intent.md +4 -4
- package/docs/specs/022-correlated-evidence/plan.md +10 -11
- package/docs/specs/022-correlated-evidence/spec.md +3 -1
- package/docs/specs/023-android-system-traces/intent.md +3 -2
- package/docs/specs/023-android-system-traces/plan.md +5 -7
- package/docs/specs/023-android-system-traces/spec.md +3 -1
- package/docs/specs/024-android-heap-dump-capture/intent.md +3 -1
- package/docs/specs/025-android-runtime-debugger/intent.md +4 -3
- package/docs/specs/025-android-runtime-debugger/plan.md +3 -1
- package/docs/specs/025-android-runtime-debugger/spec.md +4 -3
- package/docs/specs/026-code-structure-and-quality-gates/health-plan.md +88 -0
- package/docs/specs/026-code-structure-and-quality-gates/intent.md +47 -0
- package/docs/specs/026-code-structure-and-quality-gates/plan.md +191 -0
- package/docs/specs/026-code-structure-and-quality-gates/spec.md +138 -0
- package/docs/specs/026-code-structure-and-quality-gates/verification-final.json +200 -0
- package/docs/specs/026-code-structure-and-quality-gates/verification-thin-facade.json +154 -0
- package/docs/specs/026-code-structure-and-quality-gates/verification.json +136 -0
- package/docs/specs/027-debugger-failure-diagnostics/intent.md +43 -0
- package/docs/specs/027-debugger-failure-diagnostics/plan.md +86 -0
- package/docs/specs/027-debugger-failure-diagnostics/spec.md +133 -0
- package/docs/specs/028-compact-debugger-responses/intent.md +41 -0
- package/docs/specs/028-compact-debugger-responses/plan.md +112 -0
- package/docs/specs/028-compact-debugger-responses/spec.md +108 -0
- package/docs/specs/029-kotlin-locals-validation/report.md +119 -0
- package/docs/specs/030-android-coroutine-validation/evidence.json +475 -0
- package/docs/specs/030-android-coroutine-validation/intent.md +47 -0
- package/docs/specs/030-android-coroutine-validation/plan.md +147 -0
- package/docs/specs/030-android-coroutine-validation/report.md +240 -0
- package/docs/specs/030-android-coroutine-validation/spec.md +107 -0
- package/docs/specs/031-ios-system-traces/intent.md +38 -0
- package/docs/specs/031-ios-system-traces/investigation.md +92 -0
- package/docs/specs/031-ios-system-traces/late-run-failure-evidence.json +32 -0
- package/docs/specs/031-ios-system-traces/plan.md +138 -0
- package/docs/specs/031-ios-system-traces/pr102-monitor-evidence.json +22 -0
- package/docs/specs/031-ios-system-traces/simulator-evidence.json +47 -0
- package/docs/specs/031-ios-system-traces/spec.md +135 -0
- package/docs/specs/032-ios-runtime-debugger/evidence.json +176 -0
- package/docs/specs/032-ios-runtime-debugger/intent.md +38 -0
- package/docs/specs/032-ios-runtime-debugger/plan.md +95 -0
- package/docs/specs/032-ios-runtime-debugger/report.md +205 -0
- package/docs/specs/032-ios-runtime-debugger/spec.md +153 -0
- package/docs/tools/TOOLS.md +31 -18
- package/docs/tools/{evidence.md → correlated-evidence.md} +9 -1
- package/docs/tools/debugger.md +120 -4
- package/docs/tools/interact.md +42 -20
- package/docs/tools/manage.md +25 -44
- package/docs/tools/observe.md +55 -23
- package/docs/tools/system-traces.md +89 -14
- package/docs/tools/system.md +12 -5
- package/package.json +12 -8
- package/scripts/agent-plugin.mjs +55 -5
- package/scripts/architecture-graph.mjs +69 -0
- package/scripts/check-architecture.mjs +47 -0
- package/scripts/code-quality-baseline.json +1 -0
- package/scripts/code-quality.mjs +161 -0
- package/src/contracts/execution-controls.ts +26 -0
- package/src/contracts/selector.ts +17 -0
- package/src/contracts/target.ts +19 -0
- package/src/contracts/ui.ts +94 -0
- package/src/debugger/android.ts +3 -2
- package/src/debugger/diagnostics.ts +43 -0
- package/src/debugger/guard.ts +10 -5
- package/src/debugger/ios-worker.ts +49 -0
- package/src/debugger/ios.ts +45 -0
- package/{worker → src/debugger/java}/DebuggerWorker.java +9 -3
- package/src/debugger/lldb/breakpoints.py +51 -0
- package/src/debugger/lldb/inspection.py +109 -0
- package/src/debugger/lldb/worker.py +203 -0
- package/src/debugger/protocol.ts +37 -0
- package/src/debugger/sessions.ts +326 -155
- package/src/debugger/worker.ts +57 -41
- package/src/interact/adjustment/adjustment-context.ts +83 -0
- package/src/interact/adjustment/adjustment-gestures.ts +48 -0
- package/src/interact/adjustment/adjustment-plan.ts +23 -0
- package/src/interact/adjustment/adjustment-resolution.ts +104 -0
- package/src/interact/adjustment/adjustment-result.ts +34 -0
- package/src/interact/adjustment/adjustment-semantic.ts +53 -0
- package/src/interact/adjustment/adjustment-verification.ts +60 -0
- package/src/interact/adjustment/adjustment.ts +49 -0
- package/src/interact/adjustment/control-geometry.ts +120 -0
- package/src/interact/adjustment/control-values.ts +141 -0
- package/src/interact/adjustment/slider-labels.ts +84 -0
- package/src/interact/assertions/screen-assertion.ts +39 -0
- package/src/interact/assertions/state-assertion-context.ts +48 -0
- package/src/interact/assertions/state-assertion.ts +64 -0
- package/src/interact/assertions/state-comparison.ts +168 -0
- package/src/interact/assertions/visibility-assertion.ts +41 -0
- package/src/interact/conditional-action.ts +18 -12
- package/src/interact/index.ts +89 -3494
- package/src/interact/input-service.ts +11 -0
- package/src/interact/interaction-trace.ts +36 -0
- package/src/interact/model.ts +109 -0
- package/src/interact/observation.ts +7 -0
- package/src/interact/targeting/candidate-ancestor.ts +49 -0
- package/src/interact/targeting/candidate-result.ts +24 -0
- package/src/interact/targeting/candidate-scoring.ts +42 -0
- package/src/interact/targeting/element-helpers.ts +243 -0
- package/src/interact/targeting/find-element.ts +47 -0
- package/src/interact/targeting/nearby-control.ts +46 -0
- package/src/interact/targeting/resolved-elements.ts +20 -0
- package/src/interact/targeting/tap-target.ts +22 -0
- package/src/interact/targeting/target-scope.ts +121 -0
- package/src/interact/waits/legacy-log-wait.ts +30 -0
- package/src/interact/waits/legacy-wait-observations.ts +55 -0
- package/src/interact/waits/legacy-wait-state.ts +48 -0
- package/src/interact/waits/legacy-wait.ts +34 -0
- package/src/interact/waits/screen-wait.ts +37 -0
- package/src/interact/waits/ui-change-helpers.ts +184 -0
- package/src/interact/waits/ui-change-state.ts +26 -0
- package/src/interact/waits/ui-change-wait.ts +59 -0
- package/src/interact/waits/ui-wait-condition.ts +52 -0
- package/src/interact/waits/ui-wait-state.ts +55 -0
- package/src/interact/waits/ui-wait.ts +84 -0
- package/src/manage/android.ts +56 -50
- package/src/manage/index.ts +63 -93
- package/src/manage/ios/build-types.ts +14 -0
- package/src/manage/ios/build.ts +230 -0
- package/src/manage/ios/project-discovery.ts +26 -0
- package/src/manage/ios/scheme.ts +16 -0
- package/src/manage/ios.ts +67 -298
- package/src/observe/android/context.ts +1 -0
- package/src/observe/android/current-screen.ts +63 -0
- package/src/observe/android/fingerprint.ts +13 -0
- package/src/observe/android/log-stream.ts +127 -0
- package/src/observe/android/logs.ts +110 -0
- package/src/observe/android/screenshot.ts +79 -0
- package/src/observe/android/ui-tree.ts +113 -0
- package/src/observe/android.ts +17 -531
- package/src/observe/evidence.ts +122 -70
- package/src/observe/index.ts +24 -286
- package/src/observe/ios/context.ts +22 -0
- package/src/observe/ios/fingerprint.ts +12 -0
- package/src/observe/ios/log-stream.ts +103 -0
- package/src/observe/ios/logs.ts +179 -0
- package/src/observe/ios/screenshot.ts +26 -0
- package/src/observe/ios/ui-elements.ts +266 -0
- package/src/observe/ios/ui-tree.ts +143 -0
- package/src/observe/ios-trace/artifact.ts +55 -0
- package/src/observe/ios-trace/capabilities.ts +74 -0
- package/src/observe/ios-trace/native.ts +72 -0
- package/src/observe/ios-trace/notification.ts +30 -0
- package/src/observe/ios-trace/process.ts +82 -0
- package/src/observe/ios-trace/sessions.ts +204 -0
- package/src/observe/ios.ts +18 -749
- package/src/observe/logs/model.ts +11 -0
- package/src/{network → observe/network}/index.ts +2 -2
- package/src/observe/readiness-service.ts +6 -4
- package/src/observe/readiness.ts +42 -21
- package/src/observe/screenshot-encoding.ts +32 -0
- package/src/observe/snapshot-collection.ts +69 -0
- package/src/observe/snapshot-logs.ts +26 -0
- package/src/observe/snapshot-metadata.ts +51 -31
- package/src/observe/snapshot-semantic.ts +153 -0
- package/src/observe/system-trace-error.ts +3 -0
- package/src/observe/system-trace-router.ts +61 -0
- package/src/observe/system-trace.ts +28 -19
- package/src/runtime/action-results.ts +376 -0
- package/src/runtime/clock.ts +9 -0
- package/src/server/common.ts +9 -359
- package/src/server/definitions/assert.ts +164 -0
- package/src/server/definitions/diagnostic.ts +120 -0
- package/src/server/definitions/input.ts +276 -0
- package/src/server/definitions/manage.ts +196 -0
- package/src/server/definitions/observe.ts +151 -0
- package/src/server/definitions/target.ts +140 -0
- package/src/server/definitions/wait.ts +107 -0
- package/src/server/handlers/action-execution.ts +164 -0
- package/src/server/handlers/correlation.ts +20 -0
- package/src/server/handlers/debugger-handlers.ts +58 -0
- package/src/server/handlers/debugger-response.ts +7 -0
- package/src/server/handlers/diagnostic.ts +86 -0
- package/src/server/handlers/handler-types.ts +7 -0
- package/src/server/handlers/input.ts +173 -0
- package/src/server/handlers/interact.ts +135 -0
- package/src/server/handlers/journey-assertions.ts +39 -0
- package/src/server/handlers/journey.ts +132 -0
- package/src/server/handlers/manage.ts +141 -0
- package/src/server/handlers/observe.ts +116 -0
- package/src/server/handlers/payload.ts +36 -0
- package/src/server/handlers/tool-handlers.ts +170 -0
- package/src/server/schemas/condition-schema.ts +2 -0
- package/src/server/schemas/debugger-schema.ts +46 -0
- package/src/server/{journey-schema.ts → schemas/journey-schema.ts} +7 -22
- package/src/server/schemas/system-trace-schema.ts +23 -0
- package/src/server/tool-definitions.ts +67 -1143
- package/src/server-core.ts +2 -2
- package/src/server.ts +4 -4
- package/src/system/android-status.ts +124 -0
- package/src/system/android.ts +33 -21
- package/src/system/index.ts +21 -525
- package/src/system/ios-status.ts +147 -0
- package/src/system/ios.ts +14 -10
- package/src/system/model.ts +41 -0
- package/src/system/probes.ts +114 -0
- package/src/system/status-summary.ts +47 -0
- package/src/system/unsupported-status.ts +55 -0
- package/src/types.ts +16 -106
- package/src/utils/android/commands.ts +81 -0
- package/src/utils/android/gradle.ts +132 -0
- package/src/utils/android/logs.ts +103 -0
- package/src/utils/android/ui-tree.ts +239 -0
- package/src/utils/android/utils.ts +16 -556
- package/src/utils/cli/idb/check-idb.ts +4 -4
- package/src/utils/cli/idb/idb-helper.ts +6 -8
- package/src/utils/cli/idb/install-idb.ts +15 -9
- package/src/utils/cli/ios/preflight-ios.ts +39 -31
- package/src/utils/cli/ios/run-ios-ui-tree-tap.ts +4 -4
- package/src/utils/ios/utils.ts +60 -61
- package/src/utils/java.ts +62 -43
- package/src/utils/resolve-device.ts +9 -6
- package/src/utils/ui/index.ts +28 -28
- package/test/device/automated/debugger/coroutine-lifecycle.ts +27 -0
- package/test/device/automated/debugger/coroutine-support.ts +140 -0
- package/test/device/automated/debugger/coroutine.android.test.ts +169 -0
- package/test/device/automated/debugger/kotlin.android.test.ts +127 -0
- package/test/device/automated/debugger/runtime.android.test.ts +19 -3
- package/test/device/automated/debugger/runtime.ios.test.ts +221 -0
- package/test/device/automated/interact/interaction.android.test.ts +56 -0
- package/test/device/automated/observe/ios-system-trace.smoke.ts +119 -0
- package/test/device/automated/observe/system-trace.smoke.ts +1 -1
- package/test/device/manual/interact/modul8_selector_tap.manual.ts +1 -1
- package/test/fixtures/contracts/tool-definitions.json +3696 -0
- package/test/fixtures/coroutine-app/MainActivity.kt +100 -0
- package/test/fixtures/coroutine-app/README.md +48 -0
- package/test/fixtures/coroutine-app/build.ts +35 -0
- package/test/fixtures/debugger-app/MainActivity.java +21 -0
- package/test/fixtures/debugger-app/MainActivity.kt +32 -0
- package/test/fixtures/debugger-app/README.md +52 -0
- package/test/fixtures/debugger-app/build.ts +25 -15
- package/test/fixtures/ios-debugger-app/Main.swift +95 -0
- package/test/fixtures/ios-debugger-app/README.md +27 -0
- package/test/fixtures/ios-debugger-app/build.ts +21 -0
- package/test/fixtures/latency-journey-app/README.md +2 -0
- package/test/fixtures/readiness-app/README.md +2 -0
- package/test/helpers/ios-trace-shutdown.ts +29 -0
- package/test/unit/debugger/coroutine-lifecycle.test.ts +43 -0
- package/test/unit/debugger/diagnostic-sessions.test.ts +67 -0
- package/test/unit/debugger/diagnostics.test.ts +80 -0
- package/test/unit/debugger/guards.test.ts +4 -0
- package/test/unit/debugger/handle-guards.test.ts +88 -0
- package/test/unit/debugger/ios-preparation.test.ts +57 -0
- package/test/unit/debugger/ios.test.ts +104 -0
- package/test/unit/debugger/lldb-worker.py +166 -0
- package/test/unit/debugger/lldb-worker.test.ts +10 -0
- package/test/unit/debugger/preparation.test.ts +32 -0
- package/test/unit/debugger/protocol.test.ts +15 -0
- package/test/unit/debugger/sessions.test.ts +1 -1
- package/test/unit/interact/adjustment_service.test.ts +42 -0
- package/test/unit/interact/adjustment_verification.test.ts +35 -0
- package/test/unit/interact/clock_dependencies.test.ts +63 -0
- package/test/unit/interact/element_helpers.test.ts +19 -0
- package/test/unit/interact/legacy_wait_service.test.ts +17 -0
- package/test/unit/interact/state_comparison.test.ts +20 -0
- package/test/unit/interact/target_scope.test.ts +35 -0
- package/test/unit/network/get_network_activity.test.ts +1 -1
- package/test/unit/observe/ios-trace-native.test.ts +90 -0
- package/test/unit/observe/ios-trace-sessions.test.ts +131 -0
- package/test/unit/observe/readiness.test.ts +1 -1
- package/test/unit/observe/screenshot-encoding.test.ts +30 -0
- package/test/unit/observe/snapshot-logs.test.ts +14 -0
- package/test/unit/observe/system-trace-router.test.ts +49 -0
- package/test/unit/quality/agent-plugin-export.test.ts +38 -0
- package/test/unit/quality/architecture.test.ts +60 -0
- package/test/unit/quality/code-quality.test.ts +58 -0
- package/test/unit/quality/interaction_boundaries.test.ts +24 -0
- package/test/unit/server/conditional_actions.test.ts +1 -1
- package/test/unit/server/conditional_schema.test.ts +2 -2
- package/test/unit/server/debugger-response.test.ts +63 -0
- package/test/unit/server/system-trace.test.ts +12 -3
- package/test/unit/server/tool_definitions_parity.test.ts +8 -0
- package/dist/server/debugger-handlers.js +0 -38
- package/dist/server/system-trace-schema.js +0 -17
- package/dist/server/tool-handlers.js +0 -1000
- package/docs/ROADMAP.md +0 -646
- package/docs/benchmarks/ui-tree-performance/bridge-probe.json +0 -29
- package/docs/benchmarks/ui-tree-performance/initial-baseline.json +0 -59560
- package/docs/specs/baseline-spec-v0.md +0 -312
- package/docs/specs/mcp-tooling-spec-v1.md +0 -446
- package/src/server/debugger-handlers.ts +0 -29
- package/src/server/debugger-schema.ts +0 -37
- package/src/server/system-trace-schema.ts +0 -17
- package/src/server/tool-handlers.ts +0 -1008
- /package/dist/{server/condition-schema.js → contracts/condition.js} +0 -0
- /package/dist/server/{readiness-schema.js → schemas/readiness-schema.js} +0 -0
- /package/src/{server/condition-schema.ts → contracts/condition.ts} +0 -0
- /package/src/server/{readiness-schema.ts → schemas/readiness-schema.ts} +0 -0
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
# iOS runtime debugger verification — issue #70
|
|
2
|
+
|
|
3
|
+
Date: 2026-11-04. Scope: [approved specification](spec.md).
|
|
4
|
+
Implementation: existing eleven MCP debugger tools gain the optional simulator
|
|
5
|
+
LLDB backend; Android remains on JDI. This is local source/build verification,
|
|
6
|
+
not hosted CI, an installed package, a publication or physical-device evidence.
|
|
7
|
+
|
|
8
|
+
## Environment and method
|
|
9
|
+
|
|
10
|
+
macOS, Node 23.11.0 (repository requires >=22; hosted CI selects Node 22),
|
|
11
|
+
Xcode 27.2/27B52, LLDB 2103.0.34.407 and Swift 6.4.2. Simulator:
|
|
12
|
+
F9243BAF-62A8-4990-8A99-17F527F56FDA, iPhone 17 Pro, iOS 26.4.
|
|
13
|
+
The disposable Swift fixture uses `-g -Onone`, targeting iOS 18 simulator.
|
|
14
|
+
|
|
15
|
+
The runner communicates with a freshly built stdio MCP server. It checks actual
|
|
16
|
+
source stops, stack frames and synthetic known-value locals; independent fresh
|
|
17
|
+
MCP UI-tree assertions establish completion/cancellation and recovery. It does
|
|
18
|
+
not infer logical task identity from opaque thread IDs or task/thread names.
|
|
19
|
+
|
|
20
|
+
Installed idb can read UI trees but cannot inject HID with this Xcode: its
|
|
21
|
+
SimulatorKit framework path is absent. Therefore fixture actions use a private
|
|
22
|
+
command file, delivered by atomic rename and handled by the fixture main-loop
|
|
23
|
+
timer. This is independent fixture control, not proof of successful MCP tap
|
|
24
|
+
injection. Paused MCP taps are checked for rejection before dispatch. No
|
|
25
|
+
production app instrumentation, source evaluation or security changes are used.
|
|
26
|
+
|
|
27
|
+
## Evidence and results
|
|
28
|
+
|
|
29
|
+
The final stable-build simulator journey **PASS**ed with real pause expiry enabled.
|
|
30
|
+
[Compact evidence](evidence.json) records the exact server/fixture/test hashes,
|
|
31
|
+
source stops and bounded synthetic values. Recomputing the final source/build hash
|
|
32
|
+
matched the runtime fingerprint. Log: `/tmp/ios-debugger-final.log`.
|
|
33
|
+
|
|
34
|
+
| Check | Result |
|
|
35
|
+
| --- | --- |
|
|
36
|
+
| Exact source binding; pending source; non-executable line rejection | PASS |
|
|
37
|
+
| Core stack/locals and into/over/out | PASS: known=41, fresh result=42 UI |
|
|
38
|
+
| Pause guard/readiness and stale references | PASS |
|
|
39
|
+
| Cancelled event wait and usable running session | PASS |
|
|
40
|
+
| Before/after await with nested async child and actor/main-actor transitions | PASS: known=42, after=43, fresh Async result 44 UI |
|
|
41
|
+
| Step over await | PASS: source line 20 to line 21 in the resumed partial function |
|
|
42
|
+
| Task cancellation | PASS: cancelled=true and fresh Task cancelled UI |
|
|
43
|
+
| Real 60-second pause expiry | PASS: pause_limit, complete cleanup and fresh result UI |
|
|
44
|
+
| Target process exit | PASS: disconnected state, complete cleanup and fixture relaunch |
|
|
45
|
+
| Idempotent detach and server shutdown while paused | PASS: no remaining resources; independent fresh result UI |
|
|
46
|
+
|
|
47
|
+
`npm run verify` **PASS**: lint/structural/architecture checks, TypeScript build,
|
|
48
|
+
all 96 unit files and generated plugin consistency. Log:
|
|
49
|
+
`/tmp/ios-debugger-final-verify.log`. The portable usage skill and generated Cursor
|
|
50
|
+
copy now describe the advertised iOS backend; this does not install/update a
|
|
51
|
+
connected or pinned published server.
|
|
52
|
+
|
|
53
|
+
The broader device suite passed the final Android debugger regression, then
|
|
54
|
+
**FAIL**ed on an Android interaction SDK request timeout (120000 ms); its original
|
|
55
|
+
log does not identify the call. A focused assertion-identical retry with tool-name
|
|
56
|
+
and elapsed-time logging **PASS**ed every call (approximately 47 seconds total).
|
|
57
|
+
The timeout was not reproduced and its cause is unknown; no assertion, timeout,
|
|
58
|
+
retry policy or interaction implementation was changed. Original and retry logs:
|
|
59
|
+
`/tmp/ios-debugger-device-suite.log` and
|
|
60
|
+
`/tmp/ios-debugger-interaction-retest.log`. The unchanged full-suite retry passed the Android debugger/interaction checks and
|
|
61
|
+
both-platform screenshot/log/tree/correlated-evidence checks, then **FAIL**ed the
|
|
62
|
+
last Android Perfetto active-shutdown cleanup assertion (one owned capture file
|
|
63
|
+
still existed). Log: `/tmp/ios-debugger-device-suite-retry.log`.
|
|
64
|
+
|
|
65
|
+
The same isolated Perfetto test then **PASS**ed on both unmodified HEAD
|
|
66
|
+
`8bafc318a6342cf4585621d2108353836d40f72d` (archived and compiled in a temporary
|
|
67
|
+
copy using the same dependencies) and the current build. Logs:
|
|
68
|
+
`/tmp/ios-debugger-trace-baseline.log`, `/tmp/ios-debugger-trace-current.log`.
|
|
69
|
+
This does not establish the original timeout/cleanup cause or prove it fixed.
|
|
70
|
+
No tracing source, assertion or deadline was changed; no full device-suite pass
|
|
71
|
+
is claimed. The failed check's exact owned artifact was removed through the
|
|
72
|
+
existing identity-checking trace adapter. Final checks found no MCP capture files
|
|
73
|
+
or ADB forwards. Debugger/coroutine test packages and Swift build directories were
|
|
74
|
+
removed; unrelated installed fixtures were preserved. The iOS simulator was
|
|
75
|
+
returned to its initial shutdown state; the Android emulator remains running.
|
|
76
|
+
|
|
77
|
+
Independent unchanged iOS screenshot, log and UI-tree smoke checks **PASS**ed.
|
|
78
|
+
Log: `/tmp/ios-debugger-ios-observations.log`. These establish observation delivery
|
|
79
|
+
and structure, not a layout claim or successful HID input.
|
|
80
|
+
|
|
81
|
+
The initial Android runtime, Kotlin locals and coroutine MCP regressions passed
|
|
82
|
+
on emulator-5554, Android 16/API 36. Kotlin/stdlib 2.0.21, coroutines 1.9.0 and
|
|
83
|
+
fixture JDK 17.0.11 used existing cached dependencies and `/tmp/pr96-kotlinc`.
|
|
84
|
+
The debugger uses its ordinary Android Studio JBR discovery. Raw local logs:
|
|
85
|
+
`/tmp/ios-debugger-android-regression.log`,
|
|
86
|
+
`/tmp/ios-debugger-kotlin-regression.log`,
|
|
87
|
+
`/tmp/ios-debugger-coroutine-regression.log`.
|
|
88
|
+
|
|
89
|
+
`npm pack --dry-run --json` and explicit contents assertions passed for all three
|
|
90
|
+
LLDB Python modules and compiled iOS backend modules. CI packaging assertions now
|
|
91
|
+
cover these resources. This does not establish installed-package loading.
|
|
92
|
+
|
|
93
|
+
## Findings resolved during development
|
|
94
|
+
|
|
95
|
+
- Ignore internal LLDB transitions without stopped-thread evidence; consume LLDB
|
|
96
|
+
process events before reading public process/thread snapshots.
|
|
97
|
+
- Keep fixture variables live across await. The original constant's scope had no
|
|
98
|
+
location in a resume partial function; requiring its later use preserved actual
|
|
99
|
+
`known=42` inspection. Assertions were retained, not replaced by availability.
|
|
100
|
+
- Use LLDB's invalid-line sentinel for the error-reporting StepInto overload;
|
|
101
|
+
line zero is not that sentinel. Check native step errors before acknowledging.
|
|
102
|
+
- Normalize Swift Bool static storage to textual true/false; never evaluate a
|
|
103
|
+
getter, formatter, expression or object description.
|
|
104
|
+
- Preserve known suspension when a stale/invalid step is rejected. Diagnostic
|
|
105
|
+
lifecycle fallbacks cannot bypass pause guards.
|
|
106
|
+
- Bound and reuse frame references; preserve cleanup uncertainty after lost worker
|
|
107
|
+
or process handles instead of treating process closure as confirmed release.
|
|
108
|
+
- Classify signals/exceptions separately from completed steps. A synchronous
|
|
109
|
+
`simctl terminate` probe timed out while attached; the fixture now exits itself
|
|
110
|
+
to test actual process-exit cleanup without blocking the runner on a signal stop.
|
|
111
|
+
- URL-based fixture control encountered a system confirmation. The simulator was
|
|
112
|
+
rebooted to clear this fixture-created prompt; URL control was removed. Atomic
|
|
113
|
+
file delivery avoids the timer observing a partially written command.
|
|
114
|
+
|
|
115
|
+
These failed development observations remain distinct from successful reruns;
|
|
116
|
+
none is represented as evidence that all environments or timings are covered.
|
|
117
|
+
|
|
118
|
+
## Limits and review
|
|
119
|
+
|
|
120
|
+
Physical iOS devices, other Xcode/Swift/runtime versions, optimized builds,
|
|
121
|
+
installed/published-package operation, real device disconnect, forced host kill,
|
|
122
|
+
long idle/absolute expiry and a late-loaded-image binding journey remain unrun.
|
|
123
|
+
Pause expiry is checked live; idle/absolute expiry logic also has deterministic
|
|
124
|
+
worker/host unit coverage. Pending source creation is checked independently.
|
|
125
|
+
|
|
126
|
+
Swift strings and other aggregate locals expose type/opaque reference summaries;
|
|
127
|
+
standard supported numeric/bool wrappers use static storage. Missing debug values
|
|
128
|
+
remain explicitly unavailable. No suspended-task enumeration or complete logical
|
|
129
|
+
async-stack reconstruction is exposed. Async stepping evidence is the tested
|
|
130
|
+
step-over-await route, not every Swift concurrency construct.
|
|
131
|
+
|
|
132
|
+
Focused review covers target membership/start identity, source resolution, strict
|
|
133
|
+
schema/dispatch parity, bounded IPC/inspection, stop epochs, diagnostic privacy,
|
|
134
|
+
platform guards, expiry and owned teardown. Android contract compatibility remains
|
|
135
|
+
covered by its existing fixture and unit tests; iOS scope is simulator-only.
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
## PR #103 preparation-cache follow-up — 2026-11-04
|
|
139
|
+
|
|
140
|
+
[Review comment](https://github.com/clivejefferies/mobile-debug-tools/pull/103#discussion_r4470121366)
|
|
141
|
+
identified duplicated prerequisite subprocesses during attach. Preparation now
|
|
142
|
+
shares its in-flight/successful promise per server process and clears a rejected
|
|
143
|
+
promise, preserving platform checks, readiness validation and worker configuration.
|
|
144
|
+
No tool schema, timeout or inspection behaviour changes.
|
|
145
|
+
|
|
146
|
+
- **PASS** isolated fake-toolchain regression: concurrent calls share preparation,
|
|
147
|
+
failure permits retry, successful configuration is reused, and worker creation
|
|
148
|
+
adds no extra prerequisite probes.
|
|
149
|
+
- **PASS** real Xcode preparation followed by cached reuse within a 100 ms budget;
|
|
150
|
+
no app was attached by that probe.
|
|
151
|
+
- **PASS** focused real iOS MCP runtime/async/cancellation/process-exit/shutdown
|
|
152
|
+
journey on the same simulator/toolchain. Build fingerprint:
|
|
153
|
+
`0200deeb0cff9f04b54ed929258ebd19185c8be86e2badb6cdcbfa21f798fdb1`.
|
|
154
|
+
Source fingerprint remains `295ff0f30f5670530f9cdd7073b958917c1c574ccca9c7b921e295d0d902b699`.
|
|
155
|
+
Log: `/tmp/pr103-cache-ios.log`. Extended pause expiry was not repeated for
|
|
156
|
+
this preparation-only fix; the earlier extended evidence remains above.
|
|
157
|
+
- **PASS** quiet `npm run verify`: lint/quality/architecture, build, all 97 unit
|
|
158
|
+
files and plugin consistency. Log: `/tmp/pr103-cache-verify-final.log`.
|
|
159
|
+
A prior run alongside native testing failed the unchanged conditional-action
|
|
160
|
+
timing assertion. Its isolated retry passed, as did the quiet full verification;
|
|
161
|
+
no assertion or timeout was modified. Original/retry logs:
|
|
162
|
+
`/tmp/pr103-cache-verify.log`, `/tmp/pr103-cache-conditional-retest.log`.
|
|
163
|
+
|
|
164
|
+
The regression child loads its TypeScript toolchain before platform emulation,
|
|
165
|
+
so the host retains its native compiler selection on Linux. This test-only ordering
|
|
166
|
+
adjustment also passed all 97 files in `npm run verify` (log:
|
|
167
|
+
`/tmp/pr103-cache-portable-verify.log`). The preparation fix was published in
|
|
168
|
+
`f00e9fd`, and its review thread was resolved; both hosted unit-test runs passed
|
|
169
|
+
that commit. Later PR-head checks must be assessed separately.
|
|
170
|
+
|
|
171
|
+
The broader device-suite failures above remain separate; this fix does not claim
|
|
172
|
+
that their causes were established or corrected. Simulator shutdown was restored.
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
## PR #103 stored-handle guard follow-up — 2026-11-04
|
|
176
|
+
|
|
177
|
+
[Outside-diff review finding](https://github.com/clivejefferies/mobile-debug-tools/pull/103#pullrequestreview-5772655824):
|
|
178
|
+
`tap_element` could execute on its stored iOS handle's device while the central
|
|
179
|
+
guard selected Android when platform hints were omitted. The guard now obtains
|
|
180
|
+
its target through the same handle/platform/device validation used by execution.
|
|
181
|
+
Other tool defaults remain unchanged; explicit conflicting hints still reject
|
|
182
|
+
handle use rather than retargeting input.
|
|
183
|
+
|
|
184
|
+
- **PASS** regression using real handle creation with mocked device/UI/input
|
|
185
|
+
boundaries: omitted/partial hints select the stored iOS device, known pauses
|
|
186
|
+
prevent UI reads/input, a racing pause prevents native dispatch, and unrelated
|
|
187
|
+
platforms/devices remain usable. Mismatched and missing handles retain rejection.
|
|
188
|
+
- **PASS** mutation check: restoring the original Android-default guard route
|
|
189
|
+
makes that regression fail; fixed source was restored before verification.
|
|
190
|
+
- **PASS** `npm run verify`: lint/quality/architecture, build, all 98 unit files,
|
|
191
|
+
and plugin consistency. Log: `/tmp/pr103-handle-verify.log`.
|
|
192
|
+
- **PASS** updated real simulator MCP journey: obtain an iOS handle while running,
|
|
193
|
+
stop at a source breakpoint, then call `tap_element` with only that handle and
|
|
194
|
+
controls, omitting both platform and device ID. Observed `DEBUGGER_PAUSED`,
|
|
195
|
+
`delivery_status: not_delivered`, `dispatch_started: false`, and the correct
|
|
196
|
+
iOS debugger/device metadata. This proves pause rejection, not successful HID
|
|
197
|
+
injection. The existing core/async/cancellation/process-exit/shutdown journey
|
|
198
|
+
also passed on the same Xcode/LLDB/Swift/runtime matrix.
|
|
199
|
+
|
|
200
|
+
Native build fingerprint:
|
|
201
|
+
`28e56d77b9ba4caad778c223306609c3bb284b210b1ea996b927aca47134cf55`.
|
|
202
|
+
Log: `/tmp/pr103-handle-ios.log`. No fixture source change or timeout/assertion
|
|
203
|
+
weakening was needed. Device tests were run after repository verification to keep
|
|
204
|
+
the checks separate. The fixture was removed and simulator shutdown restored.
|
|
205
|
+
The earlier broader-suite limitations remain recorded above.
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# iOS runtime debugger — specification
|
|
2
|
+
|
|
3
|
+
Source: [issue #70](https://github.com/clivejefferies/mobile-debug-tools/issues/70).
|
|
4
|
+
Scope: [accepted intent](intent.md), approved by the user's “ok” on 2026-11-04.
|
|
5
|
+
Status: **approved** by the user's “ok” on 2026-11-04 in response to the complete
|
|
6
|
+
specification and approval request in this chat. Implementation authorised.
|
|
7
|
+
|
|
8
|
+
## Behaviour and supported environment
|
|
9
|
+
|
|
10
|
+
Add optional LLDB-backed debugging for an already-running development app on an
|
|
11
|
+
explicit iOS simulator UDID, on macOS with full Xcode and its Swift-enabled LLDB.
|
|
12
|
+
Initial verification targets the installed Xcode 27.2, LLDB 2103.0.34.407 and Swift
|
|
13
|
+
6.4.2 toolchain; other versions remain unverified until separately exercised.
|
|
14
|
+
Physical devices, remote hosts and production/optimised apps are unsupported in
|
|
15
|
+
this initial matrix. Normal mobile tools must not acquire an LLDB dependency.
|
|
16
|
+
|
|
17
|
+
Provide source breakpoints, stop events, bounded stacks and shallow locals,
|
|
18
|
+
into/over/out stepping, resume and detach through the existing eleven tools.
|
|
19
|
+
Attach may briefly stop the process for setup, but returns running unless an
|
|
20
|
+
actual stop event has been retained; never discard a racing breakpoint stop.
|
|
21
|
+
LLDB stops suspend the target process, not the whole simulator.
|
|
22
|
+
|
|
23
|
+
## Tool contract and compatibility
|
|
24
|
+
|
|
25
|
+
Extend `get_debugger_capabilities` and `attach_debugger` to accept
|
|
26
|
+
`platform: "android" | "ios"`, existing explicit `deviceId`, `appId` and optional
|
|
27
|
+
positive `processId`. For iOS, require a simulator UDID and valid bundle identifier.
|
|
28
|
+
Probe without attaching or launching the app. Report missing prerequisites,
|
|
29
|
+
unsupported target types, absent apps/processes and ambiguous candidates
|
|
30
|
+
explicitly. A probe cannot guarantee that later attach permission will succeed.
|
|
31
|
+
|
|
32
|
+
Preserve all existing Android requests. Extend `set_debugger_breakpoint` with
|
|
33
|
+
optional `sourceFile` (nonempty absolute local source path, maximum 512 characters).
|
|
34
|
+
Require exactly one of `className` or `sourceFile`, with the existing positive
|
|
35
|
+
1-based `line`. Android sessions require `className`; iOS sessions require
|
|
36
|
+
`sourceFile`. Invalid combinations fail `INVALID_ARGUMENT`. Resolve the full
|
|
37
|
+
path against loaded debug information, never a basename fallback or shell search.
|
|
38
|
+
Return owned breakpoint ID, pending/resolved/rejected status and actual locations.
|
|
39
|
+
Unloaded images can remain pending. Only exact executable line matches may be
|
|
40
|
+
enabled; locations silently moved by LLDB are rejected and removed.
|
|
41
|
+
|
|
42
|
+
Keep session, stop, thread and frame arguments, tool names, response modes,
|
|
43
|
+
pagination, defaults and timeout bounds unchanged. Existing common response and
|
|
44
|
+
error shapes remain: `success`, session/target/device metadata, state, timestamp,
|
|
45
|
+
capabilities, limitations, cleanup, reason, stop, operation `result`, and sanitized
|
|
46
|
+
`error: {code, message, retryable, diagnostic?}`. Device platform is correct on
|
|
47
|
+
success and failure. iOS target metadata carries bundle ID, PID, executable name,
|
|
48
|
+
process-start identity and nullable UID; Android retains its existing fields.
|
|
49
|
+
|
|
50
|
+
Capability values are backend-specific. iOS advertises supported core operations;
|
|
51
|
+
`evaluation`, `mutation`, `coroutines` and `native` remain false (`native` denotes
|
|
52
|
+
an exposed native-specific inspection capability, not LLDB's implementation).
|
|
53
|
+
Add iOS-only boolean `async_execution_inspection` and `async_stepping`; the former
|
|
54
|
+
requires the async acceptance journey below, the latter a separate demonstrated
|
|
55
|
+
step across suspension. False values carry explanatory limitations. No suspended
|
|
56
|
+
task enumeration, task identity API or logical-task reconstruction is promised.
|
|
57
|
+
Preserve compact mode's existing omissions and full attach/capabilities/state
|
|
58
|
+
responses. Unknown fields remain rejected.
|
|
59
|
+
|
|
60
|
+
## Async semantics
|
|
61
|
+
|
|
62
|
+
Source breakpoints must work before and after a controlled Swift `await`, with
|
|
63
|
+
useful known primitive locals at each actual stop. Include nested child work,
|
|
64
|
+
actor/executor transitions and a separately triggered task cancellation path.
|
|
65
|
+
Use deterministic fixture gates and completion/cancellation UI state.
|
|
66
|
+
|
|
67
|
+
Stepping acknowledges delivery and resumes; only a subsequent event establishes
|
|
68
|
+
where execution stopped. Exercise ordinary helper into/over/out and an `await`
|
|
69
|
+
boundary. Delegate stepping to Swift-enabled LLDB; do not equate a physical
|
|
70
|
+
thread ID with stable task identity. If the tested LLDB route follows the async
|
|
71
|
+
continuation, report the observed source stop and advertise `async_stepping`.
|
|
72
|
+
Otherwise report it false with the limitation and demonstrate recovery through
|
|
73
|
+
independent after-await breakpoints. Unexpected missing async locals or source
|
|
74
|
+
stops fail core async acceptance rather than being labelled support.
|
|
75
|
+
|
|
76
|
+
Stacks describe LLDB's observed frames; label unavailable source/variable data
|
|
77
|
+
and generated frames honestly. Do not claim a complete logical async ancestry.
|
|
78
|
+
No expression evaluation, object descriptions, custom formatters that execute
|
|
79
|
+
code, property getters, dynamic method calls or continuation-field traversal.
|
|
80
|
+
|
|
81
|
+
## Ownership, failure and safety
|
|
82
|
+
|
|
83
|
+
Resolve simulator, bundle executable and running PID together; validate executable
|
|
84
|
+
path, start identity and simulator membership before and after attach. Never attach
|
|
85
|
+
to an arbitrary host PID, launch a missing app or replace another debugger.
|
|
86
|
+
Reject identity changes and duplicate owned sessions. Serialize session mutations;
|
|
87
|
+
isolate sessions and guards by platform plus device, including identical IDs.
|
|
88
|
+
|
|
89
|
+
Reuse stop-scoped opaque references, the 256-event ring/100-event response limit,
|
|
90
|
+
1000-frame cap, default 20/max 100 stack page, max 100 locals and 256-character
|
|
91
|
+
string bound. Object locals expose type/opaque identity only. Missing or
|
|
92
|
+
inaccessible variables are explicit; an empty list cannot prove availability.
|
|
93
|
+
|
|
94
|
+
Generalise pause guards/readiness to iOS lifecycle actions, input, waits and
|
|
95
|
+
assertions. Preserve device-wide conservative guarding, racing-dispatch
|
|
96
|
+
uncertainty and observation access within existing deadlines. Do not claim
|
|
97
|
+
foreground identity from debugger state.
|
|
98
|
+
|
|
99
|
+
Use a dedicated owned LLDB worker with bounded structured IPC, argument-array
|
|
100
|
+
subprocess calls, disabled user init files and no arbitrary command interface.
|
|
101
|
+
Sanitize errors using the existing bounded diagnostic catalog; iOS recovery
|
|
102
|
+
guidance names Xcode/LLDB rather than JDK/ADB. Never log worker messages, locals,
|
|
103
|
+
raw stderr, exception text or source contents. Debug inspection stays local and
|
|
104
|
+
request-scoped; public evidence uses only the disposable fixture.
|
|
105
|
+
|
|
106
|
+
Retain 100–30000 ms request bounds, 60-second pause, five-minute idle and
|
|
107
|
+
30-minute session expiry, including independent worker watchdogs. Event-wait
|
|
108
|
+
cancellation preserves a usable session. Inspection timeouts preserve a known
|
|
109
|
+
session; uncertain attach or mutation outcomes trigger owned teardown and report
|
|
110
|
+
execution uncertainty. No automatic retries of attach/step/resume.
|
|
111
|
+
|
|
112
|
+
Detach releases owned suspension, breakpoints, step plans and worker resources;
|
|
113
|
+
never kill the app, another debugger or simulator. EOF/shutdown/expiry attempt
|
|
114
|
+
detach. Cleanup is idempotent and retryable with explicit remaining resources;
|
|
115
|
+
transport loss or forced host termination cannot imply confirmed recovery.
|
|
116
|
+
|
|
117
|
+
## Acceptance and verification
|
|
118
|
+
|
|
119
|
+
1. Real MCP simulator journey: attach, exact and pending source breakpoint,
|
|
120
|
+
stop, source stack, known locals, helper stepping, resume, removal and detach.
|
|
121
|
+
2. Async journey: before/after-await locals, nested work and executor transition,
|
|
122
|
+
completion, cancellation recovery, and recorded boundary-step outcome.
|
|
123
|
+
3. Safety: stale references, cross-session/device isolation, paused input and
|
|
124
|
+
readiness, cancelled event wait, process exit, attach failure, timeout,
|
|
125
|
+
automatic expiry and repeatable cleanup. Verify app usability after detach.
|
|
126
|
+
4. Contract checks cover registration, runtime validation, dispatch, both response
|
|
127
|
+
modes, diagnostics and Android compatibility. Run `npm run verify`, applicable
|
|
128
|
+
`npm run test:device`, focused iOS MCP journeys and Android debugger regressions.
|
|
129
|
+
5. Record fixture/server hashes, Xcode/LLDB/Swift/runtime versions, target UDID,
|
|
130
|
+
exact actions, observed values and independent UI-tree assertions. Report
|
|
131
|
+
physical-device and unavailable coverage as unrun, never inferred.
|
|
132
|
+
|
|
133
|
+
Likely affected areas: `src/debugger/`, debugger schemas/handlers/serialization,
|
|
134
|
+
iOS interaction/readiness boundaries, fixture/device/unit trees, packaging and
|
|
135
|
+
debugger tool documentation/README/changelog. Reuse worker/session abstractions
|
|
136
|
+
without routing Android through LLDB. Main risks are simulator process attribution,
|
|
137
|
+
LLDB/Python distribution, async metadata, source relocation and teardown races.
|
|
138
|
+
|
|
139
|
+
## Investigation evidence and remaining prerequisites
|
|
140
|
+
|
|
141
|
+
On 2026-11-04, local version probes found the toolchain above. Sandboxed simctl
|
|
142
|
+
could not contact CoreSimulator; an authorised outside-sandbox read succeeded and
|
|
143
|
+
found no booted simulators. No existing iOS debugger implementation or live iOS
|
|
144
|
+
debug journey is claimed. Implementation verification requires booting an
|
|
145
|
+
available simulator and installing only the disposable development fixture.
|
|
146
|
+
|
|
147
|
+
Apple documents async-aware stepping since Swift 6.2 in
|
|
148
|
+
[What's new in Swift](https://developer.apple.com/videos/play/wwdc2025/245/).
|
|
149
|
+
The [LLDB SBFrame API](https://lldb.llvm.org/python_reference/lldb.SBFrame-class.html)
|
|
150
|
+
provides frame-variable access. These support the proposed route, not proof of
|
|
151
|
+
this server's behaviour; exact worker loading, attach and safe variable extraction
|
|
152
|
+
must be validated before claiming support. If unavailable, record the concrete
|
|
153
|
+
blocker and return for a scope decision rather than weakening acceptance.
|
package/docs/tools/TOOLS.md
CHANGED
|
@@ -1,27 +1,40 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Tool reference
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[Documentation](../README.md)
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
- [observe](observe.md) — screenshots, logs, UI trees, fingerprints, and debug snapshots
|
|
7
|
-
- [interact](interact.md) — UI resolution, actions, waits, and deterministic verification
|
|
8
|
-
- [system](system.md) — environment and health checks
|
|
5
|
+
Use the guides below when you need a tool contract or a specific workflow.
|
|
9
6
|
|
|
10
|
-
|
|
11
|
-
[correlated evidence](evidence.md). Android performance capture is documented in
|
|
12
|
-
[system traces](system-traces.md). Android bytecode debugging is documented in
|
|
13
|
-
[runtime debugger](debugger.md).
|
|
7
|
+
## Reference guides
|
|
14
8
|
|
|
15
|
-
|
|
9
|
+
- [App management](manage.md) — build, install, launch, restart, and device management.
|
|
10
|
+
- [Observation](observe.md) — screenshots, logs, UI trees, fingerprints, debug snapshots, and app readiness.
|
|
11
|
+
- [Interaction](interact.md) — UI resolution, actions, waits, and deterministic verification.
|
|
12
|
+
- [Environment diagnostics](system.md) — toolchain discovery and health checks.
|
|
13
|
+
- [Evidence correlation](correlated-evidence.md) — action references, capture timing, and freshness.
|
|
14
|
+
- [System traces](system-traces.md) — Android Perfetto and iOS simulator Time Profiler capture with local artifacts.
|
|
15
|
+
- [Android and iOS simulator runtime debugger](debugger.md) — process attachment, breakpoints, and bounded runtime inspection.
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
## Interaction principles
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Interactive flows follow a common sequence:
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
- **expect_\*** tools are for final outcome verification
|
|
23
|
-
- observation tools are supporting context, not primary success signals
|
|
21
|
+
**RESOLVE → ACT → WAIT (if needed) → EXPECT**
|
|
24
22
|
|
|
25
|
-
|
|
23
|
+
- Resolution identifies the target before an action.
|
|
24
|
+
- Actions report execution; successful dispatch alone does not establish the intended outcome.
|
|
25
|
+
- `wait_for_*` tools resolve targets and synchronize with UI changes.
|
|
26
|
+
- `expect_*` tools verify the final outcome using explicit assertions.
|
|
27
|
+
- Observation tools provide evidence for targeting, assertions, and diagnosis; collecting evidence alone does not establish success.
|
|
28
|
+
- `get_system_status` identifies available toolchains and missing prerequisites before environment-sensitive operations. Explicit tool paths override automatic discovery when needed.
|
|
26
29
|
|
|
27
|
-
|
|
30
|
+
## Reading examples
|
|
31
|
+
|
|
32
|
+
Inputs are MCP tool arguments, not shell commands. Replace example device IDs,
|
|
33
|
+
app identifiers, and UI labels with values from your environment. Response
|
|
34
|
+
examples show relevant fields and may omit optional metadata, execution traces,
|
|
35
|
+
and [evidence correlation](correlated-evidence.md). Clients receive JSON in MCP
|
|
36
|
+
text content blocks, with additional image blocks for screenshot tools.
|
|
37
|
+
|
|
38
|
+
Parameter spelling varies by tool: for example, standalone UI waits use
|
|
39
|
+
`timeout_ms`, while journeys and readiness tools use `timeoutMs`. Follow the
|
|
40
|
+
individual tool's input contract rather than translating names between tools.
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Evidence correlation
|
|
2
|
+
|
|
3
|
+
[Documentation](../README.md) · [Tool reference](TOOLS.md)
|
|
4
|
+
|
|
5
|
+
Use evidence correlation to connect an action with later screenshots, UI trees,
|
|
6
|
+
and logs, and to understand when those observations were captured. Association
|
|
7
|
+
does not prove that the action caused an observed change.
|
|
8
|
+
|
|
9
|
+
## Associate an observation with an action
|
|
2
10
|
|
|
3
11
|
Covered actions (`start_app`, `restart_app`, `tap`, `tap_element`, `swipe`,
|
|
4
12
|
`scroll_to_element`, `type_text`, `press_back`, `adjust_control`) return an
|
package/docs/tools/debugger.md
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Runtime debugger
|
|
2
|
+
|
|
3
|
+
[Documentation](../README.md) · [Tool reference](TOOLS.md)
|
|
2
4
|
|
|
3
5
|
Optional managed Java/Kotlin bytecode debugging through an independently developed
|
|
4
6
|
JDI worker. Requires JDK 17+ (`java`, `javac`, `jdk.jdi`), Android platform-tools,
|
|
@@ -50,6 +52,54 @@ Failures carry `error: {code, message, retryable}`. Event polls use top-level
|
|
|
50
52
|
`events`, `next_cursor`, `overflow`, `timed_out`; empty waits are successful.
|
|
51
53
|
The 256-event ring returns at most 100 entries; overflow must not be ignored.
|
|
52
54
|
|
|
55
|
+
## Response modes
|
|
56
|
+
|
|
57
|
+
All eleven debugger tools accept `responseMode: "compact" | "debug"` (default
|
|
58
|
+
`"debug"`, the existing full response). Selection applies only to the current call.
|
|
59
|
+
For routine session commands, compact mode omits only top-level `device`, `target`
|
|
60
|
+
and `capabilities` when `debug_session_id` is non-null. Attach, capabilities and
|
|
61
|
+
state calls retain their full payload in either mode. Use `get_debugger_state`
|
|
62
|
+
or request `debug` to recover target/capability context.
|
|
63
|
+
|
|
64
|
+
Errors and sanitized diagnostics, identifiers, stop and execution state, event
|
|
65
|
+
cursors/overflow, limitations, truncation and cleanup remain intact. Unknown
|
|
66
|
+
session IDs still fail explicitly. Compact mode does not redact locals or prove
|
|
67
|
+
execution resumed: detach retains `execution_state: "unknown"`. Retry incomplete
|
|
68
|
+
cleanup according to its remaining resources. Invalid modes are rejected.
|
|
69
|
+
|
|
70
|
+
## Failure diagnostics
|
|
71
|
+
|
|
72
|
+
Debugger operation failures add `error.diagnostic: {stage, reason, recovery}` while
|
|
73
|
+
preserving existing error codes, messages and retryability. `stage` identifies
|
|
74
|
+
prerequisite checks, compilation, worker startup, IPC, target resolution,
|
|
75
|
+
forwarding, JDI attach, command execution, transport or cleanup; `unknown` is
|
|
76
|
+
explicit when evidence is insufficient. `reason` is a fixed classification,
|
|
77
|
+
such as `spawn_failed`, `process_exited`, `invalid_message`, `message_limit`,
|
|
78
|
+
`write_failed`, `connection_refused`, `transport_lost`, `timeout` or `cancelled`.
|
|
79
|
+
Remaining catalog values and the exact schema are defined in the
|
|
80
|
+
[accepted specification](../specs/027-debugger-failure-diagnostics/spec.md).
|
|
81
|
+
|
|
82
|
+
`recovery` is static guidance, not raw stderr or exception text. Each diagnostic
|
|
83
|
+
is at most 512 UTF-8 bytes with guidance at most 240 ASCII characters. Untrusted
|
|
84
|
+
worker fields are validated and reconstructed. No new logging or app-value
|
|
85
|
+
collection is introduced. Startup classification means no valid worker reply had
|
|
86
|
+
yet arrived; it does not establish the underlying cause of an unexpected exit.
|
|
87
|
+
Argument, stale-reference and pause/state validation errors may omit diagnostics.
|
|
88
|
+
|
|
89
|
+
Capability probes retain `success: true` and `supported: false` for unavailable
|
|
90
|
+
prerequisites; optional top-level `diagnostics` contains at most two entries,
|
|
91
|
+
ordered JDK then target. Successful probes omit it. Terminal session failures
|
|
92
|
+
retain sanitized diagnostics until normal summary expiry, even after inspection
|
|
93
|
+
data is cleared. A cleanup failure has its own diagnostic; inspect the existing
|
|
94
|
+
session reason and `cleanup.remaining_resources` as well.
|
|
95
|
+
|
|
96
|
+
Follow recovery guidance and inspect session/cleanup state before another
|
|
97
|
+
state-changing command. Timeout or cancellation does not prove nondelivery.
|
|
98
|
+
Retry incomplete cleanup with `detach_debugger`; never automatically retry
|
|
99
|
+
attach, step or resume, or kill the app/ADB server. Diagnostics improve failure
|
|
100
|
+
classification and do not establish the cause of a previously intermittent error.
|
|
101
|
+
These details describe Android; see the iOS simulator backend below for its prerequisites and recovery guidance.
|
|
102
|
+
|
|
53
103
|
## Suspension, limits and cleanup
|
|
54
104
|
|
|
55
105
|
Stops suspend all app threads. UI actions, app lifecycle/data changes, waits and
|
|
@@ -58,8 +108,8 @@ racing input submission preserves delivery uncertainty and blocks verification.
|
|
|
58
108
|
Journeys preserve completed steps. Other devices are unaffected.
|
|
59
109
|
|
|
60
110
|
`get_app_readiness` returns evidence-backed `debugger_paused` without reading the
|
|
61
|
-
UI; readiness waits fail with `DEBUGGER_PAUSED`. This signal covers managed Android
|
|
62
|
-
sessions
|
|
111
|
+
UI; readiness waits fail with `DEBUGGER_PAUSED`. This signal covers managed Android and iOS simulator
|
|
112
|
+
sessions and does not establish foreground app identity. Raw trees, screenshots
|
|
63
113
|
and logs remain available within their own timeouts; snapshot/log acquisition may
|
|
64
114
|
still fail while the app is suspended. Known pauses are annotated on observations.
|
|
65
115
|
|
|
@@ -84,21 +134,87 @@ step, resume or attach.
|
|
|
84
134
|
## Limits, privacy and evidence
|
|
85
135
|
|
|
86
136
|
There is no expression evaluation, object traversal, method invocation, mutation,
|
|
87
|
-
coroutine reconstruction, native
|
|
137
|
+
coroutine reconstruction, native-specific inspection or heap capture. The optional iOS simulator backend is described below. Kotlin
|
|
88
138
|
results follow emitted bytecode/debug metadata; optimized/obfuscated apps may lack
|
|
89
139
|
useful source lines or locals. Locals may contain private data: values are returned
|
|
90
140
|
only on request, without protocol/value logging, persistent dumps or upload.
|
|
91
141
|
Worker heap is capped at 128 MiB; IPC and messages are bounded; forwarding remains loopback-only.
|
|
92
142
|
|
|
143
|
+
For Kotlin, stop after a local's assignment before expecting its value. A stop
|
|
144
|
+
on the assignment line may precede initialization and the compiler's variable
|
|
145
|
+
scope. Compare source location and emitted debug tables before classifying a
|
|
146
|
+
missing local as a debugger failure. The isolated
|
|
147
|
+
[Kotlin validation](../specs/029-kotlin-locals-validation/report.md) covers a plain
|
|
148
|
+
calculation; it does not establish coroutine, inline/suspend, optimized or
|
|
149
|
+
obfuscated-code support.
|
|
150
|
+
|
|
151
|
+
An opt-in [coroutine fixture](../../test/fixtures/coroutine-app/README.md) assesses
|
|
152
|
+
source breakpoints across suspension, dispatcher changes, nested work and
|
|
153
|
+
cancellation with explicit Kotlin/coroutine dependencies. Use source breakpoints
|
|
154
|
+
at both sides of a suspension point and inspect each actual stop. A thread-based
|
|
155
|
+
step may stop in generated coroutine code; its acknowledgement does not establish
|
|
156
|
+
that it followed a coroutine. Stop/thread/frame references expire when execution
|
|
157
|
+
resumes. Shallow locals do not expose spilled continuation fields or reconstruct
|
|
158
|
+
parent/child coroutine identity. The [assessment record](../specs/030-android-coroutine-validation/report.md)
|
|
159
|
+
distinguishes device evidence from follow-up proposals.
|
|
160
|
+
|
|
93
161
|
Verified environments and remaining checks are recorded in
|
|
94
162
|
[the implementation plan](../specs/025-android-runtime-debugger/plan.md).
|
|
95
163
|
To run the isolated fixture journey (installs then removes its own test package):
|
|
96
164
|
|
|
97
165
|
```sh
|
|
98
166
|
MCP_DEBUGGER_DEVICE=emulator-5554 npx tsx test/device/automated/debugger/runtime.android.test.ts
|
|
167
|
+
# Exercise opt-in compact responses across the same assertions:
|
|
168
|
+
MCP_DEBUGGER_DEVICE=emulator-5554 MCP_DEBUGGER_RESPONSE_MODE=compact npx tsx test/device/automated/debugger/runtime.android.test.ts
|
|
99
169
|
# Also exercise the real 60-second pause expiry:
|
|
100
170
|
MCP_DEBUGGER_DEVICE=emulator-5554 MCP_DEBUGGER_EXTENDED=1 npx tsx test/device/automated/debugger/runtime.android.test.ts
|
|
101
171
|
```
|
|
102
172
|
|
|
103
173
|
The ordinary device suite explicitly reports this journey unrun unless the device
|
|
104
174
|
is selected. Fixture compilation requires SDK platform/build-tools 36 and `javac -g`.
|
|
175
|
+
|
|
176
|
+
## Related guides
|
|
177
|
+
|
|
178
|
+
- [App management](manage.md): build, install, and launch the app before attaching.
|
|
179
|
+
- [App readiness](observe.md#app-readiness): understand known debugger-pause evidence.
|
|
180
|
+
- [Android system traces](system-traces.md): investigate performance without paused-state inspection.
|
|
181
|
+
|
|
182
|
+
## iOS simulator backend
|
|
183
|
+
|
|
184
|
+
The same eleven tools accept `platform: "ios"` for target capability probes and
|
|
185
|
+
attach. Supply an explicit booted simulator UDID and bundle `appId`; an optional
|
|
186
|
+
`processId` must belong to that simulator's installed app. Requires macOS and full
|
|
187
|
+
Xcode with its Swift-enabled LLDB and Python bindings. Physical iOS devices remain
|
|
188
|
+
unsupported. Attach never launches an app, chooses a host process by name alone,
|
|
189
|
+
replaces another debugger, or changes security settings.
|
|
190
|
+
|
|
191
|
+
For `set_debugger_breakpoint`, supply `sourceFile` (absolute local source path)
|
|
192
|
+
and 1-based `line` for iOS; continue using binary `className` for Android. Exactly
|
|
193
|
+
one selector is required. iOS reports `resolved`, `pending` or `rejected` with
|
|
194
|
+
actual locations; LLDB line relocation is disabled. Pending breakpoints may bind
|
|
195
|
+
when their image loads. Other tool arguments, stop-scoped references, stack/locals
|
|
196
|
+
limits, event cursors, response modes and expiry durations follow the flow above.
|
|
197
|
+
|
|
198
|
+
iOS returns backend-specific capabilities and limitations; `target.uid` may be
|
|
199
|
+
null and `target.executable_path` identifies the verified simulator executable.
|
|
200
|
+
`async_execution_inspection` and `async_stepping` are independent capability flags.
|
|
201
|
+
False means the capability is not established for the backend's supported matrix;
|
|
202
|
+
inspect the limitations. A source breakpoint after await and a shallow local do
|
|
203
|
+
not enumerate suspended tasks or establish logical task identity. Step requests
|
|
204
|
+
acknowledge delivery; inspect the subsequent actual stop. Object locals expose
|
|
205
|
+
only bounded type/opaque identity; Swift standard numeric/bool wrappers are read
|
|
206
|
+
from static storage; Swift strings and other aggregates retain type summaries. No expressions, descriptions, dynamic getters or arbitrary
|
|
207
|
+
LLDB commands execute through this API.
|
|
208
|
+
|
|
209
|
+
Known iOS pauses guard lifecycle actions, input, waits and assertions on that
|
|
210
|
+
platform/device and supply `debugger_paused` readiness. Raw observations remain
|
|
211
|
+
available within their own deadlines. Detach removes owned breakpoints and worker
|
|
212
|
+
resources and releases owned suspension; it never kills the app or simulator.
|
|
213
|
+
A worker exit without confirmed detach/process exit cannot prove cleanup; retry
|
|
214
|
+
`detach_debugger` and inspect `cleanup.remaining_resources`. Failure diagnostics
|
|
215
|
+
provide static Xcode/LLDB-specific recovery guidance without raw worker text.
|
|
216
|
+
|
|
217
|
+
Use the [isolated simulator fixture](../../test/fixtures/ios-debugger-app/README.md)
|
|
218
|
+
for real MCP runtime and async checks. The [implementation plan](../specs/032-ios-runtime-debugger/plan.md)
|
|
219
|
+
records exact verification and unavailable coverage. An installed/published package,
|
|
220
|
+
physical device, or other Xcode version requires separate evidence.
|