-
Notifications
You must be signed in to change notification settings - Fork 520
@strickdd
Description
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 have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
Summary
REF: #3394 (comment)
After attempting to resolve my issue with the pre-release version of the extension, the debugger started failing again. Per @rjmholt 's suggestion, I am opening a new issue for tracking.
PowerShell Version
Both PS 5.1 and 7 have issues. Name Value ---- ----- PSVersion 7.1.0 PSEdition Core GitCommitId 7.1.0 OS Microsoft Windows 10.0.18363 Platform Win32NT PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 WSManStackVersion 3.0 Name Value ---- ----- PSVersion 5.1.18362.1474 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.18362.1474 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1
Visual Studio Code Version
1.59.1 3866c3553be8b268c8a7f8c0482c0c0177aa8bfa x64
Extension Version
ms-vscode.powershell@202180 ms-vscode.powershell-preview@2021年8月1日
Steps to Reproduce
Scenario 1 (PowerShell 5.1)
- Close all VSCode instances
- Open new instance with no folder opened
- Create a new PowerShell script
- Past in script below (do not save)
function Write-SomeStatus { # Breakpoint on following line Write-Host 'Some Status' } Write-SomeStatus
- Press F5
Expected: Breakpoint is hit
Actual: Breakpoint is skipped and script contents + "Some Status" is written to terminal
Scenario 2 (PowerShell 5.1)
- Save the script from Scenario 1 to C:\temp\DebuggingTest.ps1
- Readd the breakpoint to line 3 (as indicated)
- Press F5
- Debugger starts and attaches correctly
- Press F5 to run to completion
- Run
Write-SomeStatus
from the terminal directly - Debugger attaches to breakpoint at line 3
- Press F5 to continue and the debugger hangs (screenshot below)
Visuals
Debugger attaches when adding new Write-Host line:
image
Debugger hangs after calling from terminal directly:
image
Logs
EditorServices.log
StartEditorServices.log
vscode-powershell.log