[Lldb-commits] [lldb] [lldb-dap] launch the adapter from the workspace folder. (PR #140604)

via lldb-commits lldb-commits at lists.llvm.org
Mon May 19 12:56:35 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Ebuka Ezike (da-viper)

<details>
<summary>Changes</summary>

if the `cwd` option is empty this means the adapter is created in the home folder.

Any relative file saved is in the home folder. The files should be relative to the current workspace folder.

---
Full diff: https://github.com/llvm/llvm-project/pull/140604.diff


1 Files Affected:

- (modified) lldb/tools/lldb-dap/src-ts/debug-adapter-factory.ts (+1) 


``````````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 3a86d1f3f418f..d61b81e4c041f 100644
--- a/lldb/tools/lldb-dap/src-ts/debug-adapter-factory.ts
+++ b/lldb/tools/lldb-dap/src-ts/debug-adapter-factory.ts
@@ -184,6 +184,7 @@ export async function createDebugAdapterExecutable(
       ...configEnvironment,
       ...env,
     },
+    cwd: workspaceFolder!!.uri.fsPath,
   };
   const dbgArgs = await getDAPArguments(workspaceFolder, configuration);
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/140604


More information about the lldb-commits mailing list