Skip to content

fix(float): don't latch isShowingDebuggerView when the debugger isn't ready - #448

Open
dimashbk wants to merge 1 commit into
DebugSwift:mainfrom
dimashbk:fix/present-debugger-latch
Open

fix(float): don't latch isShowingDebuggerView when the debugger isn't ready#448
dimashbk wants to merge 1 commit into
DebugSwift:mainfrom
dimashbk:fix/present-debugger-latch

Conversation

@dimashbk

@dimashbk dimashbk commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

WindowManager.presentDebugger() sets FloatViewManager.isShowingDebuggerView = true before nil-checking floatViewController. The controller is only assigned ~1s after setup() (deferred via asyncAfter in FeatureHandling), so any presentDebugger() call inside that window — a shake handler, a ball tap injected by UI tests — latches the flag with nothing presented and nothing ever resets it:

  • the floating ball is hidden by the flag's didSet and never comes back;
  • every subsequent presentDebugger() dies on the guard;
  • worst of all, CustomWindow.point(inside:) returns true for the whole screen while the flag is set, and isUserInteractionEnabled = false is only applied inside the skipped branch — the invisible window eats every touch and the host app becomes unresponsive until relaunch.

Fix: check floatViewController in the same guard and set the flag only when the debugger is actually presented.

Type of change

  • Fix
  • Feature
  • Refactor
  • Docs
  • CI/CD

Test plan

  • Unit tests updated
  • Manual testing completed
  • CI passing

Manual test steps

  1. Call DebugSwift.App.presentDebugger() within 1s of setup() (e.g. from a shake handler right after launch).
  2. Before: ball never appears, later shakes/taps do nothing, app stops responding to touches. After: the early call is a no-op and the debugger works normally once ready.

Checklist

  • I reviewed my own changes
  • I updated docs when needed
  • I considered backward compatibility

… ready

presentDebugger() set the flag before the floatViewController nil-check;
a call within the 1s setup window latched the flag forever - hidden ball,
dead shake entry point, and CustomWindow hit-testing the whole screen
with user interaction never re-enabled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant