-
Notifications
You must be signed in to change notification settings - Fork 520
Closed
Assignees
@changbowen
Description
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
A configuration like below in launch.json is valid in the previous version 2022年8月5日:
{
"name": "Run PS Command",
"type": "PowerShell",
"request": "launch",
"cwd": "${cwd}",
"script": "Invoke-WebRequest www.bing.com",
}
With the latest 2022100 it throws an error that says PowerShell does not support debugging this file type: 'Invoke-WebRequest www.bing.com'
.
I know when run like this debugging might not work but it has been a convenient feature for quickly running something using F5 instead of going into tasks and select one to run. And it has invalidated all configurations dependent on this "feature".
Looks like it's related to changes here.
PowerShell Version
PSVersion 5.1.19041.1682 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.19041.1682 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1
Visual Studio Code Version
Version: 1.72.2 Commit: d045a5eda657f4d7b676dedbfa7aab8207f8a075 Date: 2022年10月12日T22:15:18.074Z (1 wk ago) Electron: 19.0.17 Chromium: 102.0.5005.167 Node.js: 16.14.2 V8: 10.2.154.15-electron.0 OS: Windows_NT x64 10.0.19044 Sandboxed: No
Extension Version
ms-vscode.powershell@2022100
Steps to Reproduce
Add below configuration in launch.json and run:
{
"name": "Run PS Command",
"type": "PowerShell",
"request": "launch",
"cwd": "${cwd}",
"script": "Invoke-WebRequest www.bing.com",
}
Visuals
Logs
No response