Skip to content

Commit 728b5e4

Browse files
Allow passing runspace name (#1954)
1 parent 802d3a9 commit 728b5e4

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

package.json

+5
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,11 @@
467467
"description": "Optional: The ID of the runspace to debug in the attached process. Defaults to 1. Works only on PowerShell 5 and above.",
468468
"default": null
469469
},
470+
"runspaceName": {
471+
"type": "string",
472+
"description": "Optional: The Name of the runspace to debug in the attached process. Works only on PowerShell 5 and above.",
473+
"default": null
474+
},
470475
"customPipeName": {
471476
"type": "string",
472477
"description": "The custom pipe name of the PowerShell host process to attach to. Works only on PowerShell 6.2 and above.",

src/features/DebugSession.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export class DebugSessionFeature implements IFeature, DebugConfigurationProvider
8787
}
8888
}
8989

90-
if (!config.runspaceId) {
90+
if (!config.runspaceId && !config.runspaceName) {
9191
config.runspaceId = await vscode.commands.executeCommand("PowerShell.PickRunspace", config.processId);
9292

9393
// No runspace selected. Cancel attach.

0 commit comments

Comments
 (0)