[Lldb-commits] [lldb] [lldb-dap] add `debugAdapterExecutable` property to launch configuration (PR #126803)

2025-02-12 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien updated https://github.com/llvm/llvm-project/pull/126803 >From a07148100b02fa109cd3131d2d7742cdc0ae2bfa Mon Sep 17 00:00:00 2001 From: Matthew Bastien Date: Tue, 11 Feb 2025 16:38:43 -0500 Subject: [PATCH 1/2] add `debugAdapterExecutable` property to launch co

[Lldb-commits] [lldb] [lldb-dap] add `debugAdapterExecutable` property to launch configuration (PR #126803)

2025-02-12 Thread Matthew Bastien via lldb-commits
@@ -152,6 +152,10 @@ "program" ], "properties": { + "debugAdapterExecutable": { +"type": "string", +"markdownDescription": "The LLDB debug adapter executable to use. Either an absolute path or t

[Lldb-commits] [lldb] Only include necessary files in the lldb-dap VSIX (PR #124986)

2025-01-29 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien created https://github.com/llvm/llvm-project/pull/124986 The published VSIX for the LLDB DAP extension contains a bunch of unnecessary files: ``` ❯ tar tf llvm-vs-code-extensions.lldb-dap-0.2.8.vsix extension.vsixmanifest [Content_Types].xml extension/.github/

[Lldb-commits] [lldb] Only include necessary files in the lldb-dap VSIX (PR #124986)

2025-01-29 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien edited https://github.com/llvm/llvm-project/pull/124986 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Only include necessary files in the lldb-dap VSIX (PR #124986)

2025-01-29 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien edited https://github.com/llvm/llvm-project/pull/124986 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Only include necessary files in the lldb-dap VSIX (PR #124986)

2025-01-29 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien edited https://github.com/llvm/llvm-project/pull/124986 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] add `debugAdapterExecutable` property to launch configuration (PR #126803)

2025-02-11 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien created https://github.com/llvm/llvm-project/pull/126803 The Swift extension for VS Code requires that the `lldb-dap` executable come from the Swift toolchain which may or may not be configured in `PATH`. At the moment, this can be configured via LLDB DAP's ex

[Lldb-commits] [lldb] [lldb-dap] add `debugAdapterExecutable` property to launch configuration (PR #126803)

2025-02-11 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien updated https://github.com/llvm/llvm-project/pull/126803 >From a07148100b02fa109cd3131d2d7742cdc0ae2bfa Mon Sep 17 00:00:00 2001 From: Matthew Bastien Date: Tue, 11 Feb 2025 16:38:43 -0500 Subject: [PATCH] add `debugAdapterExecutable` property to launch configu

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

2025-02-26 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien created https://github.com/llvm/llvm-project/pull/128943 Adds a process picker command to the LLDB DAP extension that will prompt the user to select a process running on their machine. It is hidden from the command palette, but can be used in an `"attach"` deb

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

2025-02-26 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien updated https://github.com/llvm/llvm-project/pull/128943 >From b9083ea16c7b1dba70cc04acf78f5001f0fb86c6 Mon Sep 17 00:00:00 2001 From: Matthew Bastien Date: Wed, 26 Feb 2025 11:18:21 -0500 Subject: [PATCH 1/3] add a process picker for attaching by PID --- lld

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

2025-02-26 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien updated https://github.com/llvm/llvm-project/pull/128943 >From b9083ea16c7b1dba70cc04acf78f5001f0fb86c6 Mon Sep 17 00:00:00 2001 From: Matthew Bastien Date: Wed, 26 Feb 2025 11:18:21 -0500 Subject: [PATCH 1/4] add a process picker for attaching by PID --- lld

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

2025-02-26 Thread Matthew Bastien via lldb-commits
matthewbastien wrote: Yeah, the CodeLLDB extension uses `lldb` to print the processes for the current platform (which could be a possibility as well, though then you'd also have to have an option to specify the `lldb` executable alongside `lldb-dap`). I'd rather have a NodeJS approach if only

[Lldb-commits] [lldb] [lldb-dap] Allow providing debug adapter arguments in the extension (PR #129262)

2025-02-28 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien edited https://github.com/llvm/llvm-project/pull/129262 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Allow providing debug adapter arguments in the extension (PR #129262)

2025-02-28 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien edited https://github.com/llvm/llvm-project/pull/129262 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Allow providing debug adapter arguments in the extension (PR #129262)

2025-02-28 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien updated https://github.com/llvm/llvm-project/pull/129262 >From 8926756d800b9ecd171b6d645a459b01342e9458 Mon Sep 17 00:00:00 2001 From: Matthew Bastien Date: Fri, 28 Feb 2025 11:08:25 -0500 Subject: [PATCH 1/2] allow providing debug adapter arguments --- lldb/

[Lldb-commits] [lldb] [lldb-dap] Allow providing debug adapter arguments in the extension (PR #129262)

2025-02-28 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien updated https://github.com/llvm/llvm-project/pull/129262 >From 8926756d800b9ecd171b6d645a459b01342e9458 Mon Sep 17 00:00:00 2001 From: Matthew Bastien Date: Fri, 28 Feb 2025 11:08:25 -0500 Subject: [PATCH 1/2] allow providing debug adapter arguments --- lldb/

[Lldb-commits] [lldb] [lldb-dap] Allow providing debug adapter arguments in the extension (PR #129262)

2025-02-28 Thread Matthew Bastien via lldb-commits
@@ -75,6 +75,15 @@ "type": "string", "description": "The path to the lldb-dap binary." }, +"lldb-dap.arguments": { + "scope": "resource", + "type": "array", + "default": [], + "items": { +"type"

[Lldb-commits] [lldb] [lldb-dap] Allow providing debug adapter arguments in the extension (PR #129262)

2025-02-28 Thread Matthew Bastien via lldb-commits
@@ -116,40 +131,31 @@ export class LLDBDapDescriptorFactory const configEnvironment = config.get<{ [key: string]: string }>("environment") || {}; const dapPath = await getDAPExecutable(session); +const dapArgs = getDAPArguments(session); const dbgOptions

[Lldb-commits] [lldb] [lldb-dap] Allow providing debug adapter arguments in the extension (PR #129262)

2025-02-28 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien updated https://github.com/llvm/llvm-project/pull/129262 >From 8926756d800b9ecd171b6d645a459b01342e9458 Mon Sep 17 00:00:00 2001 From: Matthew Bastien Date: Fri, 28 Feb 2025 11:08:25 -0500 Subject: [PATCH 1/2] allow providing debug adapter arguments --- lldb/

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

2025-02-28 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien updated https://github.com/llvm/llvm-project/pull/128943 >From b9083ea16c7b1dba70cc04acf78f5001f0fb86c6 Mon Sep 17 00:00:00 2001 From: Matthew Bastien Date: Wed, 26 Feb 2025 11:18:21 -0500 Subject: [PATCH 1/5] add a process picker for attaching by PID --- lld

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

2025-02-28 Thread Matthew Bastien via lldb-commits
@@ -0,0 +1,102 @@ +import { ChildProcessWithoutNullStreams } from "child_process"; +import { Process, ProcessTree } from "."; +import { Transform } from "stream"; + +/** Parses process information from a given line of process output. */ +export type ProcessTreeParser = (line: stri

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

2025-02-28 Thread Matthew Bastien via lldb-commits
@@ -0,0 +1,38 @@ +import { ChildProcessWithoutNullStreams, spawn } from "child_process"; +import { BaseProcessTree, ProcessTreeParser } from "../base-process-tree"; + +export class LinuxProcessTree extends BaseProcessTree { + protected override spawnProcess(): ChildProcessWithout

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

2025-02-28 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien edited 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

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

2025-02-28 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien updated https://github.com/llvm/llvm-project/pull/128943 >From b9083ea16c7b1dba70cc04acf78f5001f0fb86c6 Mon Sep 17 00:00:00 2001 From: Matthew Bastien Date: Wed, 26 Feb 2025 11:18:21 -0500 Subject: [PATCH 1/5] add a process picker for attaching by PID --- lld

[Lldb-commits] [lldb] [lldb-dap] Allow providing debug adapter arguments in the extension (PR #129262)

2025-02-28 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien updated https://github.com/llvm/llvm-project/pull/129262 >From b40c3e7e4ebb154c5f231676451acbd17e1f39f7 Mon Sep 17 00:00:00 2001 From: Matthew Bastien Date: Fri, 28 Feb 2025 11:08:25 -0500 Subject: [PATCH 1/2] allow providing debug adapter arguments --- lldb/

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

2025-02-28 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien updated https://github.com/llvm/llvm-project/pull/128943 >From b9083ea16c7b1dba70cc04acf78f5001f0fb86c6 Mon Sep 17 00:00:00 2001 From: Matthew Bastien Date: Wed, 26 Feb 2025 11:18:21 -0500 Subject: [PATCH 1/5] add a process picker for attaching by PID --- lld

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

2025-02-28 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien updated https://github.com/llvm/llvm-project/pull/128943 >From b9083ea16c7b1dba70cc04acf78f5001f0fb86c6 Mon Sep 17 00:00:00 2001 From: Matthew Bastien Date: Wed, 26 Feb 2025 11:18:21 -0500 Subject: [PATCH 1/5] add a process picker for attaching by PID --- lld

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

2025-02-28 Thread Matthew Bastien via lldb-commits
@@ -0,0 +1,102 @@ +import { ChildProcessWithoutNullStreams } from "child_process"; +import { Process, ProcessTree } from "."; +import { Transform } from "stream"; + +/** Parses process information from a given line of process output. */ +export type ProcessTreeParser = (line: stri

[Lldb-commits] [lldb] [lldb-dap] Allow providing debug adapter arguments (PR #129262)

2025-02-28 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien created https://github.com/llvm/llvm-project/pull/129262 Added a new setting called lldb-dap.arguments and a debug configuration attribute called debugAdapterArgs that can be used to set the arguments used to launch the debug adapter. Right now this is mostly

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

2025-03-06 Thread Matthew Bastien via lldb-commits
@@ -0,0 +1,15 @@ +import { LinuxProcessTree } from "./linux-process-tree"; + +function fill(prefix: string, suffix: string, length: number): string { + return prefix + suffix.repeat(length - prefix.length); +} + +export class DarwinProcessTree extends LinuxProcessTree { + protec

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

2025-03-06 Thread Matthew Bastien via lldb-commits
@@ -0,0 +1,15 @@ +import { LinuxProcessTree } from "./linux-process-tree"; + +function fill(prefix: string, suffix: string, length: number): string { + return prefix + suffix.repeat(length - prefix.length); +} + +export class DarwinProcessTree extends LinuxProcessTree { + protec

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

2025-03-06 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien updated https://github.com/llvm/llvm-project/pull/128943 >From b9083ea16c7b1dba70cc04acf78f5001f0fb86c6 Mon Sep 17 00:00:00 2001 From: Matthew Bastien Date: Wed, 26 Feb 2025 11:18:21 -0500 Subject: [PATCH 01/10] add a process picker for attaching by PID --- l

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

2025-03-06 Thread Matthew Bastien via lldb-commits
@@ -0,0 +1,52 @@ +import * as path from "path"; +import { BaseProcessTree, ProcessTreeParser } from "../base-process-tree"; +import { ChildProcessWithoutNullStreams, spawn } from "child_process"; + +export class WindowsProcessTree extends BaseProcessTree { + protected override sp

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

2025-03-06 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien updated https://github.com/llvm/llvm-project/pull/128943 >From b9083ea16c7b1dba70cc04acf78f5001f0fb86c6 Mon Sep 17 00:00:00 2001 From: Matthew Bastien Date: Wed, 26 Feb 2025 11:18:21 -0500 Subject: [PATCH 01/11] add a process picker for attaching by PID --- l

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

2025-03-06 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien edited 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

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

2025-03-06 Thread Matthew Bastien via lldb-commits
@@ -146,6 +146,9 @@ "windows": { "program": "./bin/lldb-dap.exe" }, +"variables": { + "PickProcess": "lldb-dap.pickProcess" matthewbastien wrote: Done. https://github.com/llvm/llvm-project/pull/128943 ___

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

2025-03-06 Thread Matthew Bastien via lldb-commits
@@ -0,0 +1,52 @@ +import * as path from "path"; +import { BaseProcessTree, ProcessTreeParser } from "../base-process-tree"; +import { ChildProcessWithoutNullStreams, spawn } from "child_process"; + +export class WindowsProcessTree extends BaseProcessTree { + protected override sp

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

2025-03-06 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien updated https://github.com/llvm/llvm-project/pull/128943 >From b9083ea16c7b1dba70cc04acf78f5001f0fb86c6 Mon Sep 17 00:00:00 2001 From: Matthew Bastien Date: Wed, 26 Feb 2025 11:18:21 -0500 Subject: [PATCH 01/13] add a process picker for attaching by PID --- l

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

2025-03-06 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien updated https://github.com/llvm/llvm-project/pull/128943 >From b9083ea16c7b1dba70cc04acf78f5001f0fb86c6 Mon Sep 17 00:00:00 2001 From: Matthew Bastien Date: Wed, 26 Feb 2025 11:18:21 -0500 Subject: [PATCH 01/12] add a process picker for attaching by PID --- l

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

2025-03-06 Thread Matthew Bastien via lldb-commits
@@ -27,9 +28,14 @@ export class LinuxProcessTree extends BaseProcessTree { return; } + const command = line.slice(commandOffset, argumentsOffset).trim(); + if (command === "-") { matthewbastien wrote: Added the comment. When `ps` doesn

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

2025-03-06 Thread Matthew Bastien via lldb-commits
@@ -65,6 +65,18 @@ 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 matthewbastien wrote: Fixed. https://github.com/llvm/llvm-project/pull/128943 ___

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

2025-03-06 Thread Matthew Bastien via lldb-commits
@@ -65,6 +65,18 @@ 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-commits] [lldb] [lldb-dap] Add process picker command to VS Code extension (PR #128943)

2025-03-06 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien updated https://github.com/llvm/llvm-project/pull/128943 >From b9083ea16c7b1dba70cc04acf78f5001f0fb86c6 Mon Sep 17 00:00:00 2001 From: Matthew Bastien Date: Wed, 26 Feb 2025 11:18:21 -0500 Subject: [PATCH 01/14] add a process picker for attaching by PID --- l

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

2025-03-06 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien updated https://github.com/llvm/llvm-project/pull/128943 >From b9083ea16c7b1dba70cc04acf78f5001f0fb86c6 Mon Sep 17 00:00:00 2001 From: Matthew Bastien Date: Wed, 26 Feb 2025 11:18:21 -0500 Subject: [PATCH 01/15] add a process picker for attaching by PID --- l

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

2025-03-06 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien updated https://github.com/llvm/llvm-project/pull/128943 >From b9083ea16c7b1dba70cc04acf78f5001f0fb86c6 Mon Sep 17 00:00:00 2001 From: Matthew Bastien Date: Wed, 26 Feb 2025 11:18:21 -0500 Subject: [PATCH 01/16] add a process picker for attaching by PID --- l

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

2025-03-07 Thread Matthew Bastien via lldb-commits
@@ -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-commits] [lldb] [lldb-dap] Allow providing debug adapter arguments in the extension (PR #129262)

2025-03-07 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien updated https://github.com/llvm/llvm-project/pull/129262 >From b40c3e7e4ebb154c5f231676451acbd17e1f39f7 Mon Sep 17 00:00:00 2001 From: Matthew Bastien Date: Fri, 28 Feb 2025 11:08:25 -0500 Subject: [PATCH 1/6] allow providing debug adapter arguments --- lldb/

[Lldb-commits] [lldb] [lldb-dap] Allow providing debug adapter arguments in the extension (PR #129262)

2025-03-07 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien edited https://github.com/llvm/llvm-project/pull/129262 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

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

2025-03-07 Thread Matthew Bastien via lldb-commits
@@ -34,6 +34,23 @@ function convertToInteger(value: any): number | undefined { export class LLDBDapConfigurationProvider implements vscode.DebugConfigurationProvider { + resolveDebugConfiguration( +_folder: vscode.WorkspaceFolder | undefined, +debugConfiguration: vsc

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

2025-03-07 Thread Matthew Bastien via lldb-commits
@@ -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. +

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

2025-03-07 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien updated https://github.com/llvm/llvm-project/pull/128943 >From b9083ea16c7b1dba70cc04acf78f5001f0fb86c6 Mon Sep 17 00:00:00 2001 From: Matthew Bastien Date: Wed, 26 Feb 2025 11:18:21 -0500 Subject: [PATCH 01/11] add a process picker for attaching by PID --- l

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

2025-03-07 Thread Matthew Bastien via lldb-commits
matthewbastien wrote: > You can go one level beyond this and provide a way to attach to programs > without needing launch.json configs at all! > > 1. Create a new pallete command "attach to process" > 2. Reuse the same process picker and once the user has selected one item, > issue a vscode.de

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

2025-03-07 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien updated https://github.com/llvm/llvm-project/pull/128943 >From b9083ea16c7b1dba70cc04acf78f5001f0fb86c6 Mon Sep 17 00:00:00 2001 From: Matthew Bastien Date: Wed, 26 Feb 2025 11:18:21 -0500 Subject: [PATCH 01/17] add a process picker for attaching by PID --- l

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

2025-03-06 Thread Matthew Bastien via lldb-commits
@@ -0,0 +1,48 @@ +import * as path from "path"; +import { BaseProcessTree, ProcessTreeParser } from "../base-process-tree"; + +export class WindowsProcessTree extends BaseProcessTree { + protected override getCommand(): string { +return "PowerShell"; + } + + protected overr

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

2025-03-06 Thread Matthew Bastien via lldb-commits
@@ -0,0 +1,16 @@ +import { ChildProcessWithoutNullStreams, spawn } from "child_process"; +import { LinuxProcessTree } from "./linux-process-tree"; + +function fill(prefix: string, suffix: string, length: number): string { matthewbastien wrote: Thanks! I didn't kn

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

2025-03-06 Thread Matthew Bastien via lldb-commits
@@ -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-commits] [lldb] [lldb-dap] Add process picker command to VS Code extension (PR #128943)

2025-03-06 Thread Matthew Bastien via lldb-commits
@@ -34,6 +34,23 @@ function convertToInteger(value: any): number | undefined { export class LLDBDapConfigurationProvider implements vscode.DebugConfigurationProvider { + resolveDebugConfiguration( +_folder: vscode.WorkspaceFolder | undefined, +debugConfiguration: vsc

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

2025-03-06 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien edited 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

[Lldb-commits] [lldb] [lldb-dap] Allow providing debug adapter arguments in the extension (PR #129262)

2025-03-07 Thread Matthew Bastien via lldb-commits
@@ -162,6 +171,13 @@ "type": "string", "markdownDescription": "The absolute path to the LLDB debug adapter executable to use." }, + "debugAdapterArgs": { +"type": "array", +"items": { +

[Lldb-commits] [lldb] [lldb-dap] Allow providing debug adapter arguments in the extension (PR #129262)

2025-03-07 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien updated https://github.com/llvm/llvm-project/pull/129262 >From b40c3e7e4ebb154c5f231676451acbd17e1f39f7 Mon Sep 17 00:00:00 2001 From: Matthew Bastien Date: Fri, 28 Feb 2025 11:08:25 -0500 Subject: [PATCH 1/4] allow providing debug adapter arguments --- lldb/

[Lldb-commits] [lldb] [lldb-dap] Allow providing debug adapter arguments in the extension (PR #129262)

2025-03-07 Thread Matthew Bastien via lldb-commits
@@ -93,13 +93,33 @@ async function getDAPExecutable( return undefined; } +function getDAPArguments(session: vscode.DebugSession): string[] { + // Check the debug configuration for arguments first + const debugConfigArgs = session.configuration.debugAdapterArgs; + if ( +

[Lldb-commits] [lldb] [lldb-dap] Allow providing debug adapter arguments in the extension (PR #129262)

2025-03-07 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien edited https://github.com/llvm/llvm-project/pull/129262 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Allow providing debug adapter arguments in the extension (PR #129262)

2025-03-07 Thread Matthew Bastien via lldb-commits
@@ -137,53 +157,59 @@ export class LLDBDapDescriptorFactory const dbgOptions = { env: { -...executable?.options?.env, ...configEnvironment, ...env, }, }; -const dbgArgs = executable?.args ?? []; +const dbgArgs = getDAPArg

[Lldb-commits] [lldb] [lldb-dap] Allow providing debug adapter arguments in the extension (PR #129262)

2025-03-07 Thread Matthew Bastien via lldb-commits
@@ -137,53 +157,59 @@ export class LLDBDapDescriptorFactory const dbgOptions = { env: { -...executable?.options?.env, ...configEnvironment, ...env, }, }; -const dbgArgs = executable?.args ?? []; +const dbgArgs = getDAPArg

[Lldb-commits] [lldb] [lldb-dap] Allow providing debug adapter arguments in the extension (PR #129262)

2025-03-07 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien updated https://github.com/llvm/llvm-project/pull/129262 >From b40c3e7e4ebb154c5f231676451acbd17e1f39f7 Mon Sep 17 00:00:00 2001 From: Matthew Bastien Date: Fri, 28 Feb 2025 11:08:25 -0500 Subject: [PATCH 1/5] allow providing debug adapter arguments --- lldb/

[Lldb-commits] [lldb] [lldb-dap] Allow providing debug adapter arguments in the extension (PR #129262)

2025-03-07 Thread Matthew Bastien via lldb-commits
@@ -137,53 +157,59 @@ export class LLDBDapDescriptorFactory const dbgOptions = { env: { -...executable?.options?.env, ...configEnvironment, ...env, }, }; -const dbgArgs = executable?.args ?? []; matthewbastie

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

2025-03-07 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien updated https://github.com/llvm/llvm-project/pull/128943 >From b9083ea16c7b1dba70cc04acf78f5001f0fb86c6 Mon Sep 17 00:00:00 2001 From: Matthew Bastien Date: Wed, 26 Feb 2025 11:18:21 -0500 Subject: [PATCH 01/20] add a process picker for attaching by PID --- l

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

2025-03-07 Thread Matthew Bastien via lldb-commits
@@ -34,6 +34,23 @@ function convertToInteger(value: any): number | undefined { export class LLDBDapConfigurationProvider implements vscode.DebugConfigurationProvider { + resolveDebugConfiguration( +_folder: vscode.WorkspaceFolder | undefined, +debugConfiguration: vsc

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

2025-03-07 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien updated https://github.com/llvm/llvm-project/pull/128943 >From b9083ea16c7b1dba70cc04acf78f5001f0fb86c6 Mon Sep 17 00:00:00 2001 From: Matthew Bastien Date: Wed, 26 Feb 2025 11:18:21 -0500 Subject: [PATCH 01/21] add a process picker for attaching by PID --- l

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

2025-03-07 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien updated https://github.com/llvm/llvm-project/pull/128943 >From b9083ea16c7b1dba70cc04acf78f5001f0fb86c6 Mon Sep 17 00:00:00 2001 From: Matthew Bastien Date: Wed, 26 Feb 2025 11:18:21 -0500 Subject: [PATCH 01/23] add a process picker for attaching by PID --- l

[Lldb-commits] [lldb] [lldb-dap] Allow providing debug adapter arguments in the extension (PR #129262)

2025-03-07 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien edited https://github.com/llvm/llvm-project/pull/129262 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Allow providing debug adapter arguments in the extension (PR #129262)

2025-03-11 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien updated https://github.com/llvm/llvm-project/pull/129262 >From b40c3e7e4ebb154c5f231676451acbd17e1f39f7 Mon Sep 17 00:00:00 2001 From: Matthew Bastien Date: Fri, 28 Feb 2025 11:08:25 -0500 Subject: [PATCH 1/7] allow providing debug adapter arguments --- lldb/

[Lldb-commits] [lldb] [lldb-dap] Allow providing debug adapter arguments in the extension (PR #129262)

2025-03-11 Thread Matthew Bastien via lldb-commits
@@ -66,19 +70,17 @@ async function findDAPExecutable(): Promise { } async function getDAPExecutable( - session: vscode.DebugSession, + folder: vscode.WorkspaceFolder | undefined, matthewbastien wrote: Done. https://github.com/llvm/llvm-project/pull/129262

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

2025-03-11 Thread Matthew Bastien via lldb-commits
matthewbastien wrote: > I am not sure I understand that concern. Looking at the [commit log of > swiftlang/llvm-project](https://github.com/swiftlang/llvm-project/commits/next/lldb/tools/lldb-dap), > it seems that they are picking up changes to lldb-dap very quickly. Or am I > missing somethin

[Lldb-commits] [lldb] [lldb-dap] Allow providing debug adapter arguments in the extension (PR #129262)

2025-03-11 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien edited https://github.com/llvm/llvm-project/pull/129262 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

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

2025-03-11 Thread Matthew Bastien via lldb-commits
matthewbastien wrote: One more thing that crossed my mind: given that the LLDB DAP extension will automatically be updated to the latest version by VS Code, should we also have feature flags for things like this in lldb-dap? (or is there some way already to detect which features are available?

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

2025-03-11 Thread Matthew Bastien via lldb-commits
@@ -517,6 +520,16 @@ "cwd": "^\"\\${workspaceRoot}\"" } }, + { +"label": "LLDB: Attach to Process", +"description": "", +"body": { + "type": "lldb-dap", + "request": "atta