-
Notifications
You must be signed in to change notification settings - Fork 513
PowerShell Extension terminal hangs when using Windows PowerShell #4731
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
Thanks @sba923 it looks like it having issues at the loading profile step, do you have anything in your profile? does it work without a profile? |
My If that comment out that line, the problem remains. |
I can repro this on another machine... |
Have you tried with |
Not yet... but... I hate to say... I can't seem to repro the issue right now... I'll keep trying... |
What custom key handlers do you have set, can you run it without them? |
I've found the culprit, and it's not Wrapping the loading of if (($PSVersionTable.PSVersion.Major -ne 5) -or ($host.Name -notmatch 'Visual Studio Code Host'))
{
[...]
} gives me a working session. I'll ping @JanDeDobbeleer about this. |
@sba923 last time I checked 5 worked, but also on my end that's "best effort". It's legacy 😅 |
I perfectly. Note that outside of the VScode PowerShell Extension, I don't want to support Windows PowerShell in whatever I'm implementing. I have to use it wherever PowerShell 7.x can't be used. And I thus need to debug those scripts... |
@sba923 can you get me the content of |
How do you suggest to capture it? As soon as |
@sba923 can you try again using https://github.com/JanDeDobbeleer/oh-my-posh/releases/tag/v18.21.1? |
I think there must be more to this. I have oh-my-posh, but only for PowerShell Core 7.3.9. Only
|
This issue has been labeled as needing feedback and has not had any activity for one or more weeks. It has been closed for housekeeping purposes. |
@ryan-beesley are you still able to repro this? As far as I'm concerned, I've just disabled (@JanDeDobbeleer the problem's still present with 18.25.1) |
@sba923 this should be fixed here. It fails in this handler: https://github.com/JanDeDobbeleer/oh-my-posh/blob/b31f01a1a3a127a721e4cf0b5afef9c91f462203/src/shell/scripts/omp.ps1#L212 I can extend the try-catch there as well but in my opinion, the behaviour should be identical here as when running native pwsh. |
I hate to say, but that's clearly not the case: |
What do you mean? |
I mean the issue is still present with What did you mean by "it should be fixed here"? |
@sba923 this repository. |
Oh, I see... need to find out how to get the issue reopened... @SydneyhSmith? |
@sba923, I just went through and updated everything (Oh-My-Posh, PowerShell 7.4.0), again, and restarted VSCode. The extension is now working with Windows PowerShell 5.1, so this has been resolved now for me. Neither update seems as though it should have had an impact, because the 5.1 profile wasn't being loaded, only |
Sorry, just getting back from vacation. Glad to hear it's working! |
Prerequisites
Summary
While investigating another issue I switched to "Windows PowerShell (x64)" in the "PowerShell Session Menu."
Now the session doesn't start anymore, it hangs at:
PowerShell Version
Visual Studio Code Version
Extension Version
Steps to Reproduce
powershell.powerShellDefaultVersion
being set toWindows PowerShell (x64)
.When
powershell.powerShellDefaultVersion
is set toPowerShell (x64)
the problem goes away.(I know support for Windows PowerShell 5.1 is "best effort")
Visuals
No response
Logs
169408~1.ZIP
The text was updated successfully, but these errors were encountered: