Skip to content

default debugger configuration "PowerShell Launch Script" doesn't work #4670

@peetrike

Description

@peetrike

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all open and closed 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.
  • If this is a security issue, I have read the security issue reporting guidance.

Summary

When creating VS Code Debugger configuration, using precreated configuration PowerShell: Launch Script, it doesn't work right after creating. The problem is with attribute script: it has just a comment about what it could be.

Instead it could use input variable that would prompt for script name to launch.

PowerShell Version

PS Version: 7.3.6

Visual Studio Code Version

PS ❯ code --version
1.80.1
74f6148eb9ea00507ec113ec51c489d6ffb4b771
x64

Extension Version

PS ❯ code --list-extensions --show-versions | select-string powershell

ms-vscode.powershell@2023.6.0

Steps to Reproduce

add configuration to debugger. It will add:

{
  "name": "PowerShell Launch Script",
  "type": "PowerShell",
  "request": "launch",
  "script": "enter path or command to execute e.g.: ${workspaceFolder}/src/foo.ps1 or Invoke-Pester",
  "cwd": "${cwd}"
},

Visuals

No response

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions