[Lldb-commits] [lldb] Have lldb-dap extension support multi-root workspace (PR #142470)
via lldb-commits
lldb-commits at lists.llvm.org
Mon Jun 2 12:56:42 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: None (award999)
<details>
<summary>Changes</summary>
- 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
Issue: #<!-- -->142469
---
Full diff: https://github.com/llvm/llvm-project/pull/142470.diff
1 Files Affected:
- (modified) lldb/tools/lldb-dap/src-ts/debug-adapter-factory.ts (+2-2)
``````````diff
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);
``````````
</details>
https://github.com/llvm/llvm-project/pull/142470
More information about the lldb-commits
mailing list