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

Ebuka Ezike via lldb-commits lldb-commits at lists.llvm.org
Mon May 19 12:55:55 PDT 2025


https://github.com/da-viper created https://github.com/llvm/llvm-project/pull/140604

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.

>From 825a1dea8f45c6525312b938b66cefce796a5489 Mon Sep 17 00:00:00 2001
From: Ebuka Ezike <yerimyah1 at gmail.com>
Date: Sun, 18 May 2025 23:57:32 +0100
Subject: [PATCH] [lldb][lldb-dap] launch the adapter from the workspace
 folder.

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.
---
 lldb/tools/lldb-dap/src-ts/debug-adapter-factory.ts | 1 +
 1 file changed, 1 insertion(+)

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);
 



More information about the lldb-commits mailing list