[Tools] Wait for Android JDWP application readiness - #12589
Closed
davidnguyen-tech wants to merge 2 commits into
Closed
[Tools] Wait for Android JDWP application readiness#12589davidnguyen-tech wants to merge 2 commits into
davidnguyen-tech wants to merge 2 commits into
Conversation
Use DDM boot-stage capability and STAG updates to hold the temporary JDWP connection until A_GO, with a bounded legacy fallback and deterministic protocol tests. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3c573669-b4d3-4441-85ee-5a906a62b6f7
Member
Author
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Member
|
@davidnguyen-tech FYI, I was reviewing the history on this JDWP connection. It appears to have been a workaround added for Android Subsystem for Windows, which is now retired/end-of-life. I want to just delete all this code in .NET 12, and didn't want to touch for 11 at this point unless there is a problem. I believe this code path is actually only used in Visual Studio, so not if you do |
Align the protocol-aware readiness deadline with the existing debugger launch timeout and report privacy-safe FEAT, HELO, STAG, completion, fallback, timeout, cancellation, and protocol-error milestones. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
4 tasks
Member
Author
|
Closing for #12625 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Status
Discontinued on 2026-09-01. The product-compatible preview backport was
validated downstream, but three exact consumer campaigns (
15165979,15165980, and15165981) ended at 0/3 because Android remained at the Javadebugger gate. The investigation has moved to managed-only debugging with
_AndroidAllowJavaDebugging=falseand transientam set-debug-appwithout-w. Java-debugging opt-in is no longer a required outcome, so this proposalis closing unmerged.
Original proposal
Android can acknowledge a temporary JDWP connection before
Debug.waitForDebugger()has advanced far enough for the application to continue reliably. Keeping the connection open for a fixed delay hides that race on newer runtimes and provides no protocol evidence that startup is ready.This change extends the existing JDWP packet path to:
HELOandFEAT;support_boot_stagescapability instead of assuming support from the API level;DEBGas a pre-gate state and wait for a stickyA_GOsnapshot orSTAGtransition;FEATresponse that does not advertise boot stages; andProtocol failures fail closed. Caller cancellation and readiness timeout close an in-flight stream read, preserve distinct
OperationCanceledExceptionandTimeoutExceptionbehavior, and leave forwarded-port cleanup unchanged.The deterministic tests cover pre-gate
DEBG, transition toA_GO, out-of-orderSTAGbefore a staleHELOsnapshot, timeout with a non-cooperative read, caller cancellation,FEATfailure, and the legacy fallback. The focused suite passes 6/6.