[lldb-mcp] Run managed debug sessions synchronously (#212681)
A debugger created for an MCP session has no event loop to service asynchronous stops, so a resume returned before the process stopped and every subsequent command failed against a still-running process. That made breakpoint debugging unusable: `run` reported only the launch, and `bt` that followed it errored out. Create these debuggers in synchronous mode, as lldb-dap does.
This commit is contained in:
parent
16f116f476
commit
58a93a1eec
1 changed files with 4 additions and 0 deletions
|
|
@ -183,6 +183,10 @@ DebuggerCreateTool::Call(const lldb_protocol::mcp::ToolArguments &) {
|
|||
debugger_sp->SetOutputFile(out);
|
||||
debugger_sp->SetErrorFile(out);
|
||||
|
||||
// A debugger driven over MCP has no event loop to service asynchronous
|
||||
// stops, so a resume must not return before the process has stopped.
|
||||
debugger_sp->SetAsyncExecution(false);
|
||||
|
||||
return createTextResult(to_uri(debugger_sp));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue