Skip to content

Pressing CTRL+C to cancel script doesn't stop debugging in preview extension #3700

New issue

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

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

Already on GitHub? Sign in to your account

Closed
5 tasks done
PrzemyslawKlys opened this issue Nov 23, 2021 · 5 comments · Fixed by PowerShell/PowerShellEditorServices#1685
Labels
Area-Debugging Bug: Pre-release Bugs reproducing only in the pre-release extension. Issue-Bug A bug to squash.

Comments

@PrzemyslawKlys
Copy link
Contributor

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all 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.

Summary

I just installed preview extension to see if Write-Host is fixed yet, and noticed it wasn't, so during a long time script running I press CTRL+C, but while the script stopped, GUI doesn't think so.

image

PowerShell Version

Name                           Value
----                           -----
PSVersion                      5.1.22000.282
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.22000.282
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Visual Studio Code Version

1.62.3
ccbaa2d27e38e5afa3e5c21c1c7bef4657064247
x64

Extension Version

ironmansoftware.powershell-universal@2.5.0
ms-vscode.powershell@2021.10.2
ms-vscode.powershell-preview@2021.11.1
tobysmith568.run-in-powershell@1.1.1
TylerLeonhardt.vscode-inline-values-powershell@0.0.5

Steps to Reproduce

  1. Run a script
  2. CTRL+C the script
  3. Notice how debugging is still on

Visuals

No response

Logs

No response

@PrzemyslawKlys PrzemyslawKlys added the Issue-Bug A bug to squash. label Nov 23, 2021
@ghost ghost added the Needs: Triage Maintainer attention needed! label Nov 23, 2021
@andyleejordan
Copy link
Member

@PrzemyslawKlys Can you link the tracking issue for "Write-Host is fixed yet, and noticed it wasn't"?

@andyleejordan
Copy link
Member

Also can you test if this repros with PowerShell 7.2? While I wired up a stop debugging notification so that stopping the PowerShell debugger informs Code to stop the GUI, I don't think it is supported with PowerShell 5.1

@andyleejordan andyleejordan added Bug: PowerShell 5.1 Bugs when using PowerShell 5.1. Area-Debugging and removed Needs: Triage Maintainer attention needed! labels Nov 23, 2021
@PrzemyslawKlys
Copy link
Contributor Author

It's not only PowerShell 5.1

image

Notice how I stopped CTRL+C and was able to type stuff in a terminal, while the GUI was showing something different.

I refuse to use preview until this is fixed because it ruins the output of my programs. My modules heavily rely on Write-Host and it makes it really bad.

image

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Nov 23, 2021
@andyleejordan
Copy link
Member

Cool, thanks for the information.

@andyleejordan andyleejordan removed Needs: Maintainer Attention Maintainer attention needed! Bug: PowerShell 5.1 Bugs when using PowerShell 5.1. labels Nov 23, 2021
@andyleejordan andyleejordan added this to the Committed-vNext milestone Nov 23, 2021
@andyleejordan andyleejordan added the Bug: Pre-release Bugs reproducing only in the pre-release extension. label Nov 23, 2021
@andyleejordan
Copy link
Member

It looks like the wiring up I did in PowerShell/PowerShellEditorServices#1570 was unfortunately not carried over in the pipeline threading rewrite PowerShell/PowerShellEditorServices#1459.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Debugging Bug: Pre-release Bugs reproducing only in the pre-release extension. Issue-Bug A bug to squash.
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants