Skip to content
Merged
Changes from 1 commit
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
6 changes: 6 additions & 0 deletions lldb/tools/lldb-dap/DAP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -901,9 +901,15 @@ void DAP::SendTerminatedEvent() {
// Prevent races if the process exits while we're being asked to disconnect.
llvm::call_once(terminated_event_flag, [&] {
RunTerminateCommands();

// Send a "terminated" event
llvm::json::Object event(CreateTerminatedEventObject(target));
SendJSON(llvm::json::Value(std::move(event)));

// Destroy the debugger when the session ends. This will trigger the
// debugger's destroy callbacks for earlier logging and clean-ups, rather
// than waiting for the termination of the lldb-dap process.
lldb::SBDebugger::Destroy(debugger);
});
}

Expand Down
Loading