Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,18 @@ private void handleDebugEvent(DebugEvent debugEvent, IDebugSession debugSession,
context.setVmTerminated();
context.getProtocolServer().sendEvent(new Events.ExitedEvent(0));
} else if (event instanceof VMDisconnectEvent) {
// ignore since LaunchRequestHandler has already handled.
if (context.isAttached()) {
context.setVmTerminated();
context.getProtocolServer().sendEvent(new Events.TerminatedEvent());
// Terminate eventHub thread.
try {
debugSession.getEventHub().close();
} catch (Exception e) {
// do nothing.
}
} else {
// Skip it when the debugger is in launch mode, because LaunchRequestHandler will handle the event there.
}
} else if (event instanceof ThreadStartEvent) {
ThreadReference startThread = ((ThreadStartEvent) event).thread();
Events.ThreadEvent threadEvent = new Events.ThreadEvent("started", startThread.uniqueID());
Expand Down