Debugger Issues
See original GitHub issuePrerequisites
- 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: https://github.com/PowerShell/vscode-powershell/issues/3394#issuecomment-904786408
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@2021.8.0
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:
Debugger hangs after calling from terminal directly:
Logs
EditorServices.log StartEditorServices.log vscode-powershell.log
Issue Analytics
- State:
- Created 2 years ago
- Comments:49 (26 by maintainers)
Top Results From Across the Web
7 Debugging Techniques to Speed Up Troubleshooting | Toptal
In this article, Toptal Freelance Java Developer Flavio Pezzini shows us techniques that can prevent bugs and make finding issues in production much...
Read more >Troubleshoot Breakpoints in the Visual Studio Debugger
This section provides information to troubleshoot issues when the debugger isn't displaying any warnings – the breakpoint is a solid red ...
Read more >Troubleshooting common PHP debugging issues | PhpStorm ...
This section provides the list of solutions and workarounds for common problems with Debugging in PhpStorm.
Read more >Troubleshooting vs Debugging: What's the Difference & Best ...
Debugging is a subset of troubleshooting. It requires finding problems as they relate to computer code. As a programmer, when you are tasked ......
Read more >Metal Debugger Issues | Apple Developer Forums
I have been unable to use the metal debugger ever since Apple released Xcode 12 as an update on the app store. It...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey…it’s a-working. It just might be a bit fragile (and it needs tests).
I came here trying to make heads or tails of the wide variety of odd behavior the 1.59.1 update seems to have brought my 5.1 debugging experience. Fairly consistently now in my module (no unnamed files) when i hit a breakpoint and then F5 to continue my integrated console hangs. This can’t possibly be by design, I have tried clicking all the “stop” buttons to no avail