Skip to content

Allow passing runspace name (#1954) #1973

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,11 @@
"description": "Optional: The ID of the runspace to debug in the attached process. Defaults to 1. Works only on PowerShell 5 and above.",
"default": null
},
"runspaceName": {
"type": "string",
"description": "Optional: The Name of the runspace to debug in the attached process. Works only on PowerShell 5 and above.",
"default": null
},
"customPipeName": {
"type": "string",
"description": "The custom pipe name of the PowerShell host process to attach to. Works only on PowerShell 6.2 and above.",
Expand Down
2 changes: 1 addition & 1 deletion src/features/DebugSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export class DebugSessionFeature implements IFeature, DebugConfigurationProvider
}
}

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

// No runspace selected. Cancel attach.
Expand Down