Skip to content

code execution continues to break after breakpoints have been deleted #4712

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
6 tasks done
Rom265 opened this issue Aug 24, 2023 · 1 comment
Open
6 tasks done
Labels

Comments

@Rom265
Copy link

Rom265 commented Aug 24, 2023

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all open and closed issues to ensure it has not already been reported.
  • I have read the troubleshooting guide.
  • I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
  • I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
  • 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

ms-vscode.powershell@2023.6.0

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 Rom265 added the Issue-Bug A bug to squash. label Aug 24, 2023
@SydneyhSmith
Copy link
Collaborator

SydneyhSmith commented Aug 30, 2023

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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants