================
@@ -0,0 +1,42 @@
+import * as path from "path";
+import * as vscode from "vscode";
+import { createProcessTree } from "../process-tree";
+
+interface ProcessQuickPick extends vscode.QuickPickItem {
+  processId: number;
+}
+
+/**
+ * Prompts the user to select a running process.
+ *
+ * The return value must be a string so that it is compatible with VS Code's
+ * string substitution infrastructure. The value will eventually be converted
+ * to a number by the debug configuration provider.
+ *
+ * @returns The pid of the process as a string or undefined if cancelled.
+ */
+export async function pickProcess(): Promise<string | undefined> {
----------------
matthewbastien wrote:

I really like this idea! I've added a filter to the process picker if the 
`program` is also set.

As a side note: I hadn't actually anticipated setting both `pid` and `program` 
at the same time. I accidentally left the `program` property in my example 
launch configuration.

https://github.com/llvm/llvm-project/pull/128943
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to