-
Notifications
You must be signed in to change notification settings - Fork 520
Open
Labels
Description
System Details
- Operating system name and version: Windows 10
- VS Code version: 1.19.1
- PowerShell extension version: 1.5.1
- Output from
$PSVersionTable:
Major Minor Build Revision
----- ----- ----- --------
1 5 1 0
Name Value
---- -----
PSVersion 5.1.16299.98
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.16299.98
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Issue Description
While running a script, I remove a breakpoint. It seems that, sometimes, the debugger doesn't realize that breakpoint was removed. Steps and behavior:
- Remove a breakpoint during a debug session while code is executing/running. (Note: Should be a breakpoint you would encounter past current execution)
- Execution stops where the breakpoint used to be. Debugger buttons change to the 'stopped at breakpoint' state. Verbose logging shows "Hit Line Breakpoint on '######:###'" showing the line number where the breakpoint used to be. The integrated terminal allows input and shows the "[DBG]: [DBG]: " prefix before the input line.
- At this point, trying to hit the Play button or F5 does nothing. Execution cannot resume.
- If you hit the Stop button, the debugger UI is removed. However, the integrated console is still stuck in the debug state ("[DBG]: [DBG]: " prefix).
- Using any options in the Debug menu (in the menu bar for VSCode) does nothing. F5 does nothing. You can no longer debug or get out of this 'zombie' debug state. The only option is kill the integrated terminal (or restart VSCode) to allow debugging again.
Additional note: The code this most frequently happens on is a polling process with Start-Sleep in it. I'd recommend just making a loop with a 5 to 10 second sleep between each iteration. Then, try to remove a breakpoint outside (beyond) the loop.
Attached Logs
Let me know if you need logs for this.
CalebRollins