[Lldb-commits] [lldb] [lldb-dap] fix inconsistent debugAdapterHostname argument name (PR #135544)

via lldb-commits lldb-commits at lists.llvm.org
Sun Apr 13 05:36:19 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Ely Ronnen (eronnen)

<details>
<summary>Changes</summary>

the argument is written as `debugAdapterHostname` in package.json but used as `debugAdapterHost`

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


2 Files Affected:

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


``````````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 e23d717a70101..3a86d1f3f418f 100644
--- a/lldb/tools/lldb-dap/src-ts/debug-adapter-factory.ts
+++ b/lldb/tools/lldb-dap/src-ts/debug-adapter-factory.ts
@@ -211,7 +211,7 @@ export class LLDBDapDescriptorFactory
     if (session.configuration.debugAdapterPort) {
       return new vscode.DebugAdapterServer(
         session.configuration.debugAdapterPort,
-        session.configuration.debugAdapterHost,
+        session.configuration.debugAdapterHostname,
       );
     }
 
diff --git a/lldb/tools/lldb-dap/src-ts/debug-configuration-provider.ts b/lldb/tools/lldb-dap/src-ts/debug-configuration-provider.ts
index 0272509ee55f7..8d92139c02a00 100644
--- a/lldb/tools/lldb-dap/src-ts/debug-configuration-provider.ts
+++ b/lldb/tools/lldb-dap/src-ts/debug-configuration-provider.ts
@@ -32,11 +32,11 @@ export class LLDBDapConfigurationProvider
   ): Promise<vscode.DebugConfiguration | null | undefined> {
     try {
       if (
-        "debugAdapterHost" in debugConfiguration &&
+        "debugAdapterHostname" in debugConfiguration &&
         !("debugAdapterPort" in debugConfiguration)
       ) {
         throw new ErrorWithNotification(
-          "A debugAdapterPort must be provided when debugAdapterHost is set. Please update your launch configuration.",
+          "A debugAdapterPort must be provided when debugAdapterHostname is set. Please update your launch configuration.",
           new ConfigureButton(),
         );
       }
@@ -83,7 +83,7 @@ export class LLDBDapConfigurationProvider
           // and list of arguments.
           delete debugConfiguration.debugAdapterExecutable;
           delete debugConfiguration.debugAdapterArgs;
-          debugConfiguration.debugAdapterHost = serverInfo.host;
+          debugConfiguration.debugAdapterHostname = serverInfo.host;
           debugConfiguration.debugAdapterPort = serverInfo.port;
         }
       }

``````````

</details>


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


More information about the lldb-commits mailing list