Skip to content

[lldb-dap] launch the adapter from the workspace folder. #140604

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 19, 2025

Conversation

da-viper
Copy link
Contributor

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.

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.
@llvmbot
Copy link
Member

llvmbot commented May 19, 2025

@llvm/pr-subscribers-lldb

Author: Ebuka Ezike (da-viper)

Changes

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

@da-viper da-viper merged commit 2523a83 into llvm:main May 19, 2025
13 checks passed
sivan-shani pushed a commit to sivan-shani/llvm-project that referenced this pull request Jun 3, 2025
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.
ajaden-codes pushed a commit to Jaddyen/llvm-project that referenced this pull request Jun 6, 2025
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants