Skip to content
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

CTRL+C stops debugging when stopped on breakpoint #3832

Closed
5 tasks done
PrzemyslawKlys opened this issue Feb 16, 2022 · 6 comments · Fixed by PowerShell/PowerShellEditorServices#1712
Closed
5 tasks done
Labels

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

When you start debugging and you are on a breakpoint I often go into powershell console and start doing some checks. Sometimes I do $Value | ft and it goes for minutes. So I often cancel after 2-3 seconds, which in new preview kills debugging. In production version it doesn't.

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.64.2
f80445acd5a3dadef24aa209168452a3d97cc326
x64

Extension Version

ms-vscode.powershell@2021.12.0
ms-vscode.powershell-preview@2022.2.0
tobysmith568.run-in-powershell@1.1.1
TylerLeonhardt.vscode-inline-values-powershell@0.0.5

Steps to Reproduce

  1. Run Debugging
  2. Stop on breakpoint
  3. Type something in the console that takes time and cancel it with CTRL+C
  4. Debugging ends

Visuals

No response

Logs

No response

@PrzemyslawKlys PrzemyslawKlys added the Issue-Bug A bug to squash. label Feb 16, 2022
@ghost ghost added the Needs: Triage Maintainer attention needed! label Feb 16, 2022
@JustinGrote
Copy link
Collaborator

@JustinGrote JustinGrote added Resolution-Duplicate Will close automatically. and removed Needs: Triage Maintainer attention needed! labels Feb 16, 2022
@andyleejordan
Copy link
Member

@PrzemyslawKlys I am confused, you literally asked for Ctrl-C to stop debugging in #3700

It is currently working as intended: if a task is running, hitting Ctrl-C cancels it. If it was under the debugger, that exits the debugging session.

@andyleejordan
Copy link
Member

@PrzemyslawKlys
Copy link
Contributor Author

PrzemyslawKlys commented Feb 16, 2022

No. Those are 2 different things.

  1. Press F5 - code goes and pressing ctrl+c should stop it - good - you fixed it

Second problem:

  1. Press F5 - code goes
  2. Hits breakpoint
  3. Code is stopped at this point
  4. Now I can type code in console, it runs for too long - it should cancel only the command that is running, not the whole debugger session

That's how it works in prod version. So if we are stopped within breakpoint don't use CTRL+C to stop debug session, because we are in state where the code is not running.

@PrzemyslawKlys PrzemyslawKlys changed the title CTRL+C stops debugging CTRL+C stops debugging when stopped on breakpoint Feb 16, 2022
@andyleejordan andyleejordan reopened this Feb 16, 2022
@andyleejordan andyleejordan moved this to Todo in Sea Biscuit Feb 16, 2022
@andyleejordan andyleejordan added Area-Debugging and removed Resolution-Duplicate Will close automatically. labels Feb 16, 2022
@andyleejordan andyleejordan moved this from Todo to In Progress in Sea Biscuit Feb 16, 2022
Repository owner moved this from In Progress to Done in Sea Biscuit Feb 16, 2022
@andyleejordan
Copy link
Member

The fix for this is out in PowerShell Preview!

@ghost
Copy link

ghost commented Feb 24, 2022

Thank you for your comment, but please note that this issue has been closed for over a week. For better visibility, consider opening a new issue with a link to this instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Done
3 participants