You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/DAP_BACKEND_IMPLEMENTATION_PLAN.md
+9-11Lines changed: 9 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,3 @@
1
-
<chatName="DAP backend plan"/>
2
-
3
1
## Goal & constraints (grounded in current code)
4
2
5
3
Implement a real **`lldb-dap` Debug Adapter Protocol backend** that plugs into the existing debugger architecture without changing MCP tool names/schemas. The DAP backend remains **opt-in only** via `XCODEBUILDMCP_DEBUGGER_BACKEND=dap` (current selection logic in `src/utils/debugger/debugger-manager.ts`).
@@ -185,7 +183,7 @@ export class DapTransport {
185
183
- Backend may still serialize higher-level operations if stateful.
186
184
187
185
**Side effects**
188
-
-Adds a long-lived child process per session.
186
+
-Add a long-lived child process per session.
189
187
- Requires careful memory management in the framing buffer (ensure you slice consumed bytes).
190
188
191
189
---
@@ -273,12 +271,12 @@ export async function createDapBackend(opts?: {
273
271
4)`configurationDone` if required by lldb-dap behavior (plan for it even if no-op)
274
272
5) mark attached
275
273
276
-
-`detach()`:
274
+
-`detach()`
277
275
- send `disconnect` with `terminateDebuggee: false` (do not kill app)
278
276
- dispose transport / kill process
279
277
280
-
-`dispose()`:
281
-
- best-effort cleanup; **must not throw** (important because `DebuggerManager.createSession` calls dispose on attach failure)
278
+
-`dispose()`
279
+
- best-effort cleanup; **must not throw** (important because `DebuggerManager.createSession` calls dispose to clean up on attach failure)
@@ -568,6 +566,6 @@ Add a section “DAP Backend (lldb-dap)”:
568
566
---
569
567
570
568
## Critical “don’t miss” requirements
571
-
-`dispose()` in DAP backend and transport must be **best-effort and never throw**, because `DebuggerManager.createSession()` will call dispose on attach failure.
569
+
-`dispose()` in DAP backend and transport must be **best-effort and never throw** because `DebuggerManager.createSession()` will call dispose on attach failure.
572
570
- Avoid any use of default executors/spawners in tests; ensure `createDapBackend()` accepts injected `executor` + `spawner`.
573
571
- Breakpoint removal requires stateful re-application with `setBreakpoints` / `setFunctionBreakpoints`; plan for breakpoint registries from day one.
**Hypothesis:** Screenshot tool stores and returns full-resolution PNGs.
26
26
**Findings:** The `screenshot` tool captures a PNG, then immediately downscales/optimizes via `sips` to max 800px width, JPEG format, quality 75%, and returns the JPEG. Optimization is always attempted; on failure it falls back to original PNG.
**Conclusion:** The current implementation already downscales by default; the gap is configurability (opt-in/out, size/quality controls) and documentation.
29
29
30
-
### 2025-01-XX - Git history check
30
+
### 2026-01-04 - Git history check
31
31
**Hypothesis:** Recent commits might have added/changed screenshot optimization behavior.
32
32
**Findings:** Recent history shows tool annotations and session-awareness changes, but no indication of configurable screenshot scaling.
Copy file name to clipboardExpand all lines: docs/investigations/issue-describe-ui-empty-after-debugger-resume.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
# RCA: describe_ui returns empty tree after debugger resume
2
2
3
3
## Summary
4
-
When the app is stopped under LLDB (breakpoints hit), the `describe_ui` tool frequently returns an empty accessibility tree (0x0 frame, no children). This is not caused by a short timing gap after resume. The root cause is that the process is still stopped (or immediately re-stopped) due to active breakpoints, so AX snapshotting cannot retrieve a live hierarchy.
4
+
When the app is stopped under LLDB (breakpoints hit), the `describe_ui` tool frequently returns an empty accessibility tree (0x0 frame, no children). This is not because of a short timing gap after resume. The root cause is that the process is still stopped (or immediately re-stopped) due to active breakpoints, so AX snapshotting cannot retrieve a live hierarchy.
5
5
6
6
## Impact
7
7
- UI automation appears "broken" after resuming from breakpoints.
0 commit comments