-
Notifications
You must be signed in to change notification settings - Fork 234
Debugger hangs when you press stop while an input prompt is active #428
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
Comments
Cool, I'll take a look tonight. Aborting the execution should cancel the prompt, but maybe I lost that behavior with the integrated console changes |
Seems like there's a larger problem here where input prompts can't be cancelled via code, only through the integrated console. I believe this was caused by my change to using Console.ReadKey synchronously on a background thread. I think it's going to require a loop to check the state of the cancellation token while waiting for the string to be read on a different thread. Not a huge change, but it'll require some testing. Might have to hold off until the next update. |
This change enables the cancellation of input prompts by calling a function rather than using Ctrl+C in the console. This is necessary in cases like stopping the debugger where an active input prompt can cause the debugger to hang if it can't be cancelled. The fix is to be more reactive to the abort of command execution so that the active input prompt can be cancelled. Resolves PowerShell#428.
Current work is here: daviwil@d3c440f |
This change fixes an issue where the debugger will hang when the user tries to stop execution while there is an active input or choice prompt. The solution is to use a more robust method for cancelling the prompt task which doesn't depend on the Console.ReadKey() call to return. Fixes PowerShell#428.
Add 'Open Examples Folder' command
This is with PSES 0.12.1 and VSCode 1.11.0. Try this. Open a file and put in
Remove-Item
. This will prompt you for a path to remove. Stop debugging before replying to the prompt in the console. The debugger appears to stop but if you try to debug again, it doesn't start debugging.The text was updated successfully, but these errors were encountered: