We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 62ff9ac commit c35a97fCopy full SHA for c35a97f
lldb/tools/lldb-dap/DAP.cpp
@@ -901,9 +901,15 @@ void DAP::SendTerminatedEvent() {
901
// Prevent races if the process exits while we're being asked to disconnect.
902
llvm::call_once(terminated_event_flag, [&] {
903
RunTerminateCommands();
904
+
905
// Send a "terminated" event
906
llvm::json::Object event(CreateTerminatedEventObject(target));
907
SendJSON(llvm::json::Value(std::move(event)));
908
909
+ // Destroy the debugger when the session ends. This will trigger the
910
+ // debugger's destroy callbacks for earlier logging and clean-ups, rather
911
+ // than waiting for the termination of the lldb-dap process.
912
+ lldb::SBDebugger::Destroy(debugger);
913
});
914
}
915
0 commit comments