Skip to content

Using a launch configuration with interactive arguments does not work correctly in Powershell preview extension #3770

Closed
PowerShell/PowerShellEditorServices
#1702
@Hetshu

Description

@Hetshu

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all issues to ensure it has not already been reported.
  • I have read the troubleshooting guide.
  • I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
  • I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.

Summary

Using a launch configuration like

{
            "name": "Current File w/Args",
            "type": "PowerShell",
            "request": "launch",
            "script": "${file}",
            "args": [
                "${command:SpecifyScriptArgs}"
            ],
            "cwd": "${file}"
},

and starting the debugger in a powershell script tab with F5 and adding the following arguments in the following popup
image

results in the following terminal output
image
if running this with Powershell Preview extension.

This prevents the powershell script to parse the supplied parameters correctly.

Erroneous behavior:

image

Expected behavior: (screenshot from working non preview powershell extension)

image

PowerShell Version

Name                           Value
----                           -----
PSVersion                      7.2.1
PSEdition                      Core
GitCommitId                    7.2.1
OS                             Microsoft Windows 10.0.19043
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visual Studio Code Version

1.63.2
899d46d82c4c95423fb7e10e68eba52050e30ba3
x64

Extension Version

ms-vscode.powershell-preview@2022.1.0

Steps to Reproduce

see above in the summary

Visuals

No response

Logs

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions