-
Notifications
You must be signed in to change notification settings - Fork 498
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
[Powershell Preview regression bug] Debugger hangs when a breakpoint inside a scriptblock is hit #2448
Comments
May be related to #2246. Worth noting that generally most scriptblocks will behave as normal, but there are a few exacerbating factors here:
|
I've just managed to reproduce this. Will investigate |
So a preliminary look shows the following:
|
So:
First naive theoretical solution: flag when the command being run is the prompt to tell the debugger not to wait for the stack frame to resume |
It's probably going to go further than that. Since PSRL is still running, the ReadLine runspace handle will be taken. That handle queue isn't set up to be nested like the normal execute handles. None of the read line stuff is set up for that scenario iirc. Plus even if you get all that sorted, the |
@Jawz84 Hello, and thank you for your patience! The latest PowerShell Preview for VS Code is now out, and includes the reworking of our pipeline and threading architecture in PowerShell/PowerShellEditorServices#1295. Could you verify if this issue still reproduces using v2022.1.0-preview? Please note that this preview is likely to include other bugs, and you should feel free to file new issues for those so we can work through them. Thanks again! |
Let me start out by saying: thanks for the huge amount of work, that has undoubtably gone into the complete overhaul. 💙 I've tried to reproduce on 2022.1.0-preview. This time, the behaviour was different. The debugger did attach after the 'tab' keystroke. After that, I was able to F10 step through, until I hit this error on line 11 (closing curly for scriptblock
After this error, the debugger detaches, and control is given back to the terminal. The terminal is usable as normal after this. VSCode does not hang or become unresponsive. There is one little quirk though: the debug start/stop control is still visible, and showing as if the debugger session is still running: I think it's a major improvement! |
This is super helpful because it looks just like #3751. Given that, I'm going to mark this particular issue as resolved, and thank you for the second repro of that early safe handle disposal bug (which is already triaged and slated to be fixed). Thank you! |
I've seen it several times but haven't figured out a good repro either. |
This issue has been marked as fixed. It has been automatically closed for housekeeping purposes. |
Agreed, thanks. Great work everyone! |
Issue Description
I am experiencing a problem with the debugger. It hangs when a breakpoint inside a scriptblock is hit.
Steps to reproduce:
Beyond this point, you can only kill the integrated terminal. It will not accept any other input.
NOTE:
This only happens in the PowerShell Preview Extension. The GA PowerShell extension does not have this bug.
The bug is also not reproducible in a stand alone console in PowerShell 5.1, Powershell 6.2.3, or 7.0.0.rc2, or PowerShell_ise (5.1). It is specific to the Preview version of the extension.
Attached Logs
1580281742-dc8c91be-e55c-4eed-822f-c087bed38b011580281219461.zip
Environment Information
Visual Studio Code
PowerShell Information
Visual Studio Code Extensions
Visual Studio Code Extensions(Click to Expand)
The text was updated successfully, but these errors were encountered: