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

Matthew Bastien via lldb-commits lldb-commits at lists.llvm.org
Thu Mar 6 16:10:50 PST 2025


================
@@ -65,6 +65,19 @@ This will attach to a process `a.out` whose process ID is 123:
 }
 ```
 
+You can also use the variable substituion `${command:PickProcess}` to select a
+process at the start of the debug session instead of setting the pid manually:
+
+```javascript
+{
+  "type": "lldb-dap",
+  "request": "attach",
+  "name": "Attach to PID",
+  "program": "/tmp/a.out",
+  "pid": "${command:PickProcess}"
----------------
matthewbastien wrote:

That's a nice feature to have. I've added logic to the `LLDBDapConfigurationProvider` that will set `pid` to `"${command:pickProcess}"` if neither `pid` nor `program` are specified in an `attach` request.

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


More information about the lldb-commits mailing list