[Lldb-commits] [lldb] 9d356c3 - Have lldb-dap extension support multi-root workspace (#142470)
via lldb-commits
lldb-commits at lists.llvm.org
Mon Jun 2 14:31:44 PDT 2025
Author: award999
Date: 2025-06-02T14:31:40-07:00
New Revision: 9d356c39b7a594a1ce3a27c2487febc382f5a5a7
URL: https://github.com/llvm/llvm-project/commit/9d356c39b7a594a1ce3a27c2487febc382f5a5a7
DIFF: https://github.com/llvm/llvm-project/commit/9d356c39b7a594a1ce3a27c2487febc382f5a5a7.diff
LOG: Have lldb-dap extension support multi-root workspace (#142470)
- Allow running when no workspace folder is present, and do not override
the `cwd` set in the launch configuration
- Support getting configuration from workspace file
Fixes #142469
Added:
Modified:
lldb/tools/lldb-dap/src-ts/debug-adapter-factory.ts
Removed:
################################################################################
diff --git a/lldb/tools/lldb-dap/src-ts/debug-adapter-factory.ts b/lldb/tools/lldb-dap/src-ts/debug-adapter-factory.ts
index d61b81e4c041f..b5db45b56d6a6 100644
--- a/lldb/tools/lldb-dap/src-ts/debug-adapter-factory.ts
+++ b/lldb/tools/lldb-dap/src-ts/debug-adapter-factory.ts
@@ -169,7 +169,7 @@ export async function createDebugAdapterExecutable(
workspaceFolder: vscode.WorkspaceFolder | undefined,
configuration: vscode.DebugConfiguration,
): Promise<vscode.DebugAdapterExecutable> {
- const config = vscode.workspace.getConfiguration("lldb-dap", workspaceFolder);
+ const config = vscode.workspace.workspaceFile ? vscode.workspace.getConfiguration("lldb-dap") : vscode.workspace.getConfiguration("lldb-dap", workspaceFolder);
const log_path = config.get<string>("log-path");
let env: { [key: string]: string } = {};
if (log_path) {
@@ -184,7 +184,7 @@ export async function createDebugAdapterExecutable(
...configEnvironment,
...env,
},
- cwd: workspaceFolder!!.uri.fsPath,
+ cwd: configuration.cwd ?? workspaceFolder?.uri.fsPath,
};
const dbgArgs = await getDAPArguments(workspaceFolder, configuration);
More information about the lldb-commits
mailing list