Skip to content

Commit 7d62d35

Browse files
authored
Fix hot code replacement event order (#648)
Co-authored-by: Harsh <313093191+Mr-KnightCLI@users.noreply.github.com>
1 parent a658059 commit 7d62d35

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎com.microsoft.java.debug.plugin/src/main/java/com/microsoft/java/debug/plugin/internal/JavaHotCodeReplaceProvider.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -624,9 +624,9 @@ private void stepIntoThread(ThreadReference thread) {
624624
currentDebugSession.getEventHub().stepEvents().filter(debugEvent -> request.equals(debugEvent.event.request()))
625625
.take(1).subscribe(debugEvent -> {
626626
debugEvent.shouldResume = false;
627-
// Have to send to events to keep the UI sync with the step in operations:
628-
context.getProtocolServer().sendEvent(new Events.StoppedEvent("step", thread.uniqueID()));
627+
// Send continued before stopped so stopped remains the final UI state when delivered immediately or queued.
629628
context.getProtocolServer().sendEvent(new Events.ContinuedEvent(thread.uniqueID()));
629+
context.getProtocolServer().sendEvent(new Events.StoppedEvent("step", thread.uniqueID()));
630630
});
631631
request.enable();
632632
thread.resume();

0 commit comments

Comments
 (0)