debugger: Shutdown debug adapter client on terminated event (#30278)

I noticed some problems where we have hanging debug sessions after
they've been terminated. This should hopefully fix most cases of this,
if not all.

Release Notes:

- N/A
This commit is contained in:
Anthony Eid 2025-05-09 11:24:28 +02:00 committed by GitHub
parent b88ba44b32
commit cfb06bac8a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1172,8 +1172,7 @@ impl Session {
self.clear_active_debug_line(cx);
}
Events::Terminated(_) => {
self.is_session_terminated = true;
self.clear_active_debug_line(cx);
self.shutdown(cx).detach();
}
Events::Thread(event) => {
let thread_id = ThreadId(event.thread_id);