Skip to content

args not passed to script being debugged from launch.json #24

Closed
@pkskelly

Description

@pkskelly

I have tried several combinations of "args": [] and none of them produce a $args in the debugger. Should the "args" parameter for a configuration work? Looking through the source but not finding anything yet.
{
"version": "0.1.0",
"configurations": [
{
"name": "PowerShell",
"type": "PowerShell",
"program": "PowerShell Scripts/output.ps1",
"args": ["Verbose:$true"],
"request": "launch"
}
]
}

The debugger launches fine, but attempts using "-Verbose", "-Verbose:$true", or "/Verbose:$true" do not get passed to $args. The "output.ps1" file is very simple:

Write-Output $args
Get-Process
Write-Verbose -Message "Debugging PS in VSCode!"

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions