-
Notifications
You must be signed in to change notification settings - Fork 510
PowerShell Integrated Console does not start on PowerShell Preview 2021.4.2 #3306
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 Integrated Console does not start on PowerShell Preview 2021.4.2 #3306
Comments
Thanks @kborowinski we are having some trouble reproducing this issue, and are not seeing anything interesting in the logs (thanks for providing those!), are you also seeing this issue one PowerShell 7? It would also be great to know if you have hit this in the past with other versions...in all likelihood we may need to add more logging to debug this. Thanks! |
@SydneyhSmith Good tip with the PowerShell 7. The PowerShell Integrated Console starts correctly on PS 7.2 (daily). I've also noticed that when the console hangs during startup on PS 5.1, switching PowerShell session to 7.2 and then back to Edit: I don't have this issue on Preview 2021.4.1. |
That's helpful, this does seem to repro specifically with Windows PowerShell 5.1. Hm...will have to debug. |
This bug makes preview extension 90% useles in PowerShell 5.1 😭 It does work from time to time |
I'll make sure it doesn't find it's way into stable 😓 |
Oof, that makes this harder. |
@andschwa I've tested the behavior on 4 different computers and it follows the 80/20 pattern, i.e. the PIC on PS 5.1 hangs on start 8 out of 10 times. |
Any chance you have logs from those sessions? I just got my old Windows box back up and running (I've been working on a Mac mini), seems to repro, I just gotta find what's going wrong now 🕵️ |
Annoyingly this doesn't repro when I am debugging it 😢 |
Talk about ironic. This repros with:
and then it stops reproducing (and doesn't seem to wait for the debugger!) with:
@rjmholt any ideas? |
Hm...it's not 100% though for me. It's like 50/50. |
1620244955-ae2c3707-365c-4519-a4e5-f01827ffd1481620244936081.zip As requested - full log. |
Ok, @PrzemyslawKlys and @kborowinski I could use your help. While I can occasionally repro this, and even under the debugger a couple times, I have so far been unable to find the information I need to solve it. What appears to happen is that the server code (the .NET app hosting PowerShell) is stuck waiting for PowerShell to run a work item (the PSES module code), and it's just never running. I've built a VSIX where the .NET code was compiled in debug configuration, has additional logs, and will continue to print logs to the console even after the banner is printed (this is normally prevented by unsubscribing the logger). Since you both seem to able to reproduce this more consistently and with:
Please try the attached VSIX (in a zip because GitHub wouldn't let me otherwise upload it), with diagnostic logs, and capture the logs printed to the Integrated Console when it hangs. While all I've done is add logs, build it locally and in debug mode, I cannot seem to reproduce the bug with this build. Thank you! |
@andschwa The first batch of logs from one machine but two different VSCode Insiders versions: 1620283399-fe2846fc-cf9b-4099-b1ba-732dccc0edb41620283397504.zip 1620283729-2ae2b962-074d-408d-acc3-a86bcd185db11620283727771.zip |
Additional logs from other machine with VSCode Stable: 1620284685-eebfe89b-b2df-471a-91d2-390223f8bf6e1620284684240.zip |
If you need mine, please let me know. |
You're certain the integrated console hung in this session? The logs indicate the server is up and running and responding to requests... |
Tomorrow I can post the logs again from that particular machine. |
It's ok! I managed to get it to hang (though without diagnostic logs, of course) and can see that the server is up and responding to requests, it's just the console that doesn't get to the point of printing the prompt. So, that's a start! |
The better news is I've managed to get it to hang more consistently, with logging! It only does so when I build as a VSIX and install it, rather than run it under a launched (and debugged) VS Code instance. |
Ok, hear me out, but can you reproduce this? Get the Integrated Console to hang, then open your
Like, if it were set to Diagnostics, change it to Normal, or something. When I do that and save the file, the console finally reaches its prompt. |
Yup, I can reproduce that fairly consistently. When the console is "hung" and then I trigger a real |
I'm on the below build of Insiders and I see no hung integrated terminal, it is just not running at all. https://twitter.com/wsmelton/status/1392130847734652933 I have gone in and changed the logging for the preview extension to diagnostic, verbose and back to normal (each with a reload and opening a PS1 file). No longs are generated and the extension shows no indication that it started. It is not until I do the restart PS session that it will start up and I can access to the integrated terminal. I'd note I see this behavior on both extensions (stable and preview).
|
@wsmelton what version of PowerShell? Sounds like a potentially different issue to me. |
This happens whether I'm using PS 7.1.3 or Windows PowerShell 5.1. Was not sure if it would be separate or not. |
Ok! We think we have a more clear understanding of what's going on, for anybody who's interested OmniSharp/csharp-language-server-protocol#588 This is still actively being debugged (heck, it's what I've spent most of the last few weeks looking at). |
@kborowinski, @PrzemyslawKlys, @rjmholt, and others, can ya'll test this attached VSIX and tell me if it repros? I think I fixed it with OmniSharp/csharp-language-server-protocol#589 Umm, GitHub is erroring when I upload the zip. |
Attached? Can you attach it? 😊 |
Trying in a new comment. ... Nope. I get "is not included in the list" |
So far it works. I'll let you know. |
@andschwa Tested on my home PC, so far so good. Will test tomorrow morning at work on two more machines. |
Tested on my personal and on the company machine the whole day. It worked perfect. |
@andschwa Have used the Preview 2021.5.0 whole day at work without any problems so the fix apparently works, thanks! |
Yay! Will make sure this patch is merged into OmniSharp and that everything on our end is updated before I do the next release. |
This pulls in OmniSharp/csharp-language-server-protocol#589 which fixes PowerShell/vscode-powershell#3306!
I'll try to get a new preview out ASAP! |
Issue Description
PowerShell Integrated Console does not start on VSCode 1.55.2 (Stable) with PowerShell Preview 2021.4.2
Attached Logs
1619554566-4c04d7c7-874b-4077-a2e4-3b993520c4a11619554562893.zip
powershell_editor_services_trace_server.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: