vscode-powershell icon indicating copy to clipboard operation
vscode-powershell copied to clipboard

code execution continues to break after breakpoints have been deleted

Open Rom265 opened this issue 1 year ago • 1 comments

Prerequisites

  • [X] I have written a descriptive issue title.
  • [X] I have searched all open and closed issues to ensure it has not already been reported.
  • [X] I have read the troubleshooting guide.
  • [X] I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
  • [X] I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
  • [X] If this is a security issue, I have read the security issue reporting guidance.

Summary

If I remove debugger breakpoints, code execution continues to break. This happens every time.

PowerShell Version

> $psversiontable

Name                           Value
----                           -----
PSVersion                      7.3.6
PSEdition                      Core
GitCommitId                    7.3.6
OS                             Microsoft Windows 10.0.19045
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visual Studio Code Version

> code --version
1.81.1
6c3e3dba23e8fadc360aed75ce363ba185c49794
x64

Extension Version

> code --list-extensions --show-versions | Select-String powershell

[email protected]

Steps to Reproduce

I can make a command engage the debugger by running my command like wait-debugger;My-Cmdlet argument. I have to hit F11 once or twice to actually get into the script, but then it works fine. However, if I remove the breakpoints that I set and run the command like My-Cmdlet argument it continues to break on the lines where the breakpoints were set, but no longer show in the interface. Obviously, it should not be breaking. The only way I know to make it stop doing that is to restart VS Code, or maybe restarting the Powershell extension would work.

Visuals

No response

Logs

No response

Rom265 avatar Aug 24 '23 20:08 Rom265

Thanks @Rom265 , this is because we don't sync breakpoints, VScode doesn't update until you restart the debug session...we have an open PR for this #4065 we plan to get back to this work shortly

SydneyhSmith avatar Aug 30 '23 18:08 SydneyhSmith