PowerShell / PowerShell/vscode-powershell

code execution continues to break after breakpoints have been deleted

Open
#4,712 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Area-Debugging Issue-Bug
Dominant language
TypeScript
Stars
1.9k
Forks
547
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in the PowerShell extension with wait-debugger;My-Cmdlet argument, step into the script, delete the breakpoints, and rerun My-Cmdlet argument. Trace the breakpoint state after deletion; done means execution no longer stops at deleted breakpoints and does not require restarting VS Code or the PowerShell extension.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell, typescript, vscode
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.