From 48f1ad9425fec0f9190bb6338d2c90f53126618b Mon Sep 17 00:00:00 2001 From: Harsh <313093191+Mr-KnightCLI@users.noreply.github.com> Date: Sat, 31 Oct 2026 14:25:44 +0530 Subject: [PATCH] Fix hot code replacement event order --- .../debug/plugin/internal/JavaHotCodeReplaceProvider.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/com.microsoft.java.debug.plugin/src/main/java/com/microsoft/java/debug/plugin/internal/JavaHotCodeReplaceProvider.java b/com.microsoft.java.debug.plugin/src/main/java/com/microsoft/java/debug/plugin/internal/JavaHotCodeReplaceProvider.java index 3a2b2f3d..b1bd1f41 100644 --- a/com.microsoft.java.debug.plugin/src/main/java/com/microsoft/java/debug/plugin/internal/JavaHotCodeReplaceProvider.java +++ b/com.microsoft.java.debug.plugin/src/main/java/com/microsoft/java/debug/plugin/internal/JavaHotCodeReplaceProvider.java @@ -624,9 +624,9 @@ private void stepIntoThread(ThreadReference thread) { currentDebugSession.getEventHub().stepEvents().filter(debugEvent -> request.equals(debugEvent.event.request())) .take(1).subscribe(debugEvent -> { debugEvent.shouldResume = false; - // Have to send to events to keep the UI sync with the step in operations: - context.getProtocolServer().sendEvent(new Events.StoppedEvent("step", thread.uniqueID())); + // Send continued before stopped so stopped remains the final UI state when delivered immediately or queued. context.getProtocolServer().sendEvent(new Events.ContinuedEvent(thread.uniqueID())); + context.getProtocolServer().sendEvent(new Events.StoppedEvent("step", thread.uniqueID())); }); request.enable(); thread.resume();