[Lldb-commits] [lldb] [lldb-dap] Add process picker command to VS Code extension (PR #128943)

via lldb-commits lldb-commits at lists.llvm.org
Fri Mar 7 06:37:46 PST 2025


================
@@ -34,6 +34,23 @@ function convertToInteger(value: any): number | undefined {
 export class LLDBDapConfigurationProvider
   implements vscode.DebugConfigurationProvider
 {
+  resolveDebugConfiguration(
+    _folder: vscode.WorkspaceFolder | undefined,
+    debugConfiguration: vscode.DebugConfiguration,
+    _token?: vscode.CancellationToken,
+  ): vscode.ProviderResult<vscode.DebugConfiguration> {
+    // Default "pid" to ${command:pickProcess} if neither "pid" nor "program" are specified
+    // in an "attach" request.
+    if (
+      debugConfiguration.request === "attach" &&
+      !("pid" in debugConfiguration) &&
----------------
Da-Viper wrote:

I do not think that program is needed based on the current lldb-dap `AttachReqestHandler` as it only uses the PID , port or attachCommands to attach to the process. So even if we pass the program name it will not be read. 

see 
https://github.com/llvm/llvm-project/blob/50a0931ccd82a7e4541650744363c87d9e0e5496/lldb/tools/lldb-dap/Handler/AttachRequestHandler.cpp#L62-L64

https://github.com/llvm/llvm-project/blob/50a0931ccd82a7e4541650744363c87d9e0e5496/lldb/tools/lldb-dap/Handler/AttachRequestHandler.cpp#L141-L144

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


More information about the lldb-commits mailing list