-
Notifications
You must be signed in to change notification settings - Fork 518
Description
System Details
- Operating system name and version: Windows 7 (64-bit)
PowerShell Integrated Console
PS C:\> code -v
1.13.1
379d2efb5539b09112c793d3d9a413017d736f89
PS C:\> $pseditor.EditorServicesVersion
Major Minor Build Revision
----- ----- ----- --------
1 4 0 0
PS C:\> code --list-extensions --show-versions
DotJoshJohnson.xml@1.9.1
ms-mssql.mssql@1.0.0
ms-vscode.csharp@1.10.0
ms-vscode.PowerShell@1.4.0
ms-vsts.team@1.119.0
robertohuertasm.vscode-icons@7.9.0
PS C:\> $PSVersionTable
Name Value
---- -----
PSVersion 5.0.10586.117
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.10586.117
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Issue Description
When a breakpoint is removed while the debugger is active (not at a breakpoint), the debugger functionality breaks. I believe it is still hitting breakpoints but not displaying that they have been hit, and it hangs when attempting to debug again.
To reproduce:
- Open VSCode and save the script below.
$start = Get-Date
while ((New-Timespan -Start $start -end (get-date)).Seconds -lt 15) {
Write-Host "Blah!" # <-- Set a breakpoint here
Start-Sleep -Seconds 5
}
- Set a breakpoint as indicated and start debugging the script.
- When the breakpoint is hit, press F5 (continue) and remove the breakpoint before it is hit again.
After about 5 seconds, I noticed that the pause icon changed to a play icon and the "Hit Line breakpoint" message appeared in the terminal, but no breakpoint indication was present in the editor. Neither F5 or clicking the continue button resumed the script. Clicking the stop button a few times stopped the debugging. Attempting to re-run caused the debug controls to display, but debugging did not start and the execute command which usually appears in the terminal did not display.
Restarting the PowerShell session returned the debugger to normal.