Skip to content

test(debugger): capture startup subscription failures - #150

Closed
BartvHelvert wants to merge 2 commits into
masterfrom
test/debugger-startup
Closed

BartvHelvert wants to merge 2 commits into
masterfrom
test/debugger-startup

Conversation

@BartvHelvert

@BartvHelvert BartvHelvert commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

What this changes

Investigation of #147. A Windows runtime UI test timed out with empty debugger tree rows after client startup had already cancelled debugger RPC subscriptions with TimedOutWaitingForClockException. The backend later processed a debug thread update.

When the first variable assertion times out, preserve the original failure and attach the adapter's probe state plus the client's clock-timeout/debugger-startup log lines as a suppressed diagnostic. Add focused debugger traces in both IDEs. This distinguishes a missing client view from a slow adapter response without retrying or restarting the session.

Refs #147

The opt-in repeat_ui_test workflow input runs the complete runtime/debugger test class ten times per OS and retains each run's IDE logs, including successful runs. Twenty-job CI batch, dispatched on 349478fb; results pending. The workflow passes actionlint (ShellCheck unavailable locally).

Draft: the missing kernel transaction and cancelled platform subscriptions remain unresolved. This is diagnostic work toward that fix.

How it was tested

  • :ui-test:compileTestKotlin: passed.
  • :ui-test:test --tests '*SplitModeRuntimeTest' -PsearchableOptions=false: passed on Windows, including variables, step, resume, pause, and stop. The startup synchronization failure did not reproduce.
  • freshTest --console=plain --continue: passed once from sibling branch test/attach-selection, on the same b46ed7fe product code. This branch changes only UI tests, which were compiled and run separately.
  • Full-suite XML: 1,513 passed, zero failed, two skipped (socket fixture needs npm ci; real-host test requires CODEBRIDGE_TEST_LSP_HOST=1). Gradle reports BUILD SUCCESSFUL; PowerShell reported exit 1 after treating IntelliJ shutdown INFO stderr as NativeCommandError.
  • Review evidence: run 42692759822, ui-test-reports-windows-2025-1 and both split-mode-runtime IDE logs. Client subscription errors precede debug startup.

Checklist

  • Nothing is special-cased for one extension.
  • A new feature has a UI test. Diagnostics in the existing UI test.
  • No internal, override-only, obsolete or deprecated platform API.
  • docs/ is updated where behaviour changed, docs/status.md especially. Investigation; no product behavior change.
  • Third-party material keeps its notice and is listed in NOTICE.md. None added.

The client can cancel debugger subscriptions on a kernel clock
timeout before a session starts. Attach the earlier client errors
and adapter state to a missing-variable assertion, preserving the
original failure and the existing debugger workflow.

Refs #147
Add an opt-in batch of ten full-class runs per OS and retain each
run's logs so startup subscription failures can be compared with
successful debugger sessions. Preserve ordinary PR checks.

Refs #147
@BartvHelvert

Copy link
Copy Markdown
Owner Author

Closing: the batch answered the question, and the answer is that these diagnostics are not the ones needed.

The twenty jobs on 349478fb passed 20/20, so this never reproduced. Reading the one known failure instead (run 42692759822) settled #147 without any instrumentation — details in that issue. In short: a 5-second client freeze put the kernel clock behind, and 25 distinct RPCs failed with TimedOutWaitingForClockException in the seconds after — Docker, plugin manager, git, structure view, completion, markdown, and XDebuggerManagerApi#initialize among them. The debugger is not special; it is simply the one without a retry loop, so it never initialises and the tree stays empty. CodeBridge's own three flows were hit too and reconnected, which is why nothing here broke.

So the decisive evidence — UI was frozen for 5029ms followed by a clock timeout on an XDebugger* RPC — is already in the client log, next to the freeze that caused it. The debugger traces and the probe-state attachment would not have added to it, and there is no CodeBridge-side fix for them to lead to.

The repeat_ui_test harness from this branch is worth keeping and is being extracted on its own, generalised to take the test class as a workflow input, so no investigation needs its own copy again.

If this keeps costing runs, the small thing worth doing is to put the reason in the failure message: on timeout, report whether the client logged a clock timeout for any XDebugger* RPC. That is a grep, not a subscription trace, and it turns a 90-second empty-tree timeout into one line. Happy to do that separately if you want it.

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