Repository navigation
fix: Fix hot code replacement event order - #648
Merged
wenyt (wenytang-ms) merged 1 commit intoNov 2, 2026
Merged
Conversation
Harsh (Mr-KnightCLI)
requested review from
Changyong Gong (chagong),
Sheng Chen (jdneo),
Jinbo Wang (testforstephen) and
wenyt (wenytang-ms)
as code owners
October 31, 2026 09:01
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the hot code replacement event-ordering change.
No open issues 🎉
What changed in this PR
Fixes #559 by making hot code replacement event ordering consistent, so the debugger UI reflects the thread’s suspended state regardless of event delivery timing.
Changes:
- Sends
ContinuedEventbeforeStoppedEventin the step callback. - Updates the comment to explain why stopped must be the final UI state.
| File | Description |
|---|---|
| com.microsoft.java.debug.plugin/src/main/java/com/microsoft/java/debug/plugin/internal/JavaHotCodeReplaceProvider.java | Reorders hot code replacement events and documents the ordering requirement. |
Review effort: Balanced
wenyt (wenytang-ms)
approved these changes
Nov 2, 2026
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.
Fixes #559.
During hot code replacement,
ProtocolServercan queue the stopped event while a request is being dispatched but send it immediately otherwise. SendingStoppedEventbeforeContinuedEventmakes the delivered order depend on timing; in one path, the UI ends in a running state although the thread is suspended.Send
ContinuedEventfirst andStoppedEventlast so the final UI state consistently reflects the suspended thread.Validation:
git diff --checkpassed. Tests were not run.