-
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 extension stuck at "Starting PowerShell.." #1626
Comments
Can you change the |
Hi @rkeithhill I had enabled that prior to the first upload. I just went back through the logs and can't find anything that jumps out. I am going to attach two zips: the last two launches of VSCODE in case I am missing something really obvious.
1543850094-c1b1601a-e9ac-4afd-afe2-46fa771a60f31543850083161.zip |
nothing in the logs other informational stuff. :( Frustrating how little I have to go on here. |
@compwiz32 Is the device you are using, restricted or locked down in anyway, for example with Group Policy? |
@SydneyhSmith My hunch going into opening this thread was that, yes, my issue is environment specific. Yes, I have a decent amount of GPO's and defense industry lock-downs (but not too bad). I am cool waiting for the next version. However, I am frustrated that I can't seem to generate an error that would point me in the direction of where the error may lie. Other than switching from diagnostic to verbose logging, anything else I could try to possibly highlight where my issue may be? |
If you're able to edit the If you can see any other possibilities for logging in Start-EditorServices.ps1, let us know as well. I've seen one or two of these mysterious failures now, where I'm really not sure what's causing the issue. The fundamental problem is that we have a client/server architecture, so when the server doesn't reply, the client doesn't know what's failed. |
Another thought I've had: it may end up that the script is not "failing" just blocked forever on something. If so, it might be possible to put a |
This looks sort of similar to when something is blocking |
I do have same problem with PowerShell Extension in VSCode. At first, the editor would not start because it could not find 'api-ms-win-core-sysinfo-l1-2-0.dll' - I found a workaround - see #1633 If a debug session run until end of script, the debugger will not start on 2nd run. If I break and stop the debug session, then a 2nd debug session works fine. |
I have tried the Debug open new session as mentioned above.
|
I have exactly same problem since 1.10 update. Didn't had this problem before. Did you already found any solution/workaround or we need to wait until next release? |
Can everyone here try this workaround: |
See #1633 (comment) for the DLL to download |
My A/V: Symantec AV FYI - v1.10.0 made no difference for me and I did import the new DLL listed in #1633 as directed by @TylerLeonhardt I am working through @rjmholt suggestions now re ErrorAction Stop and Wait-Debugger. I'll comment after testing. I also believe that this probably a case of "just blocked forever on something" rather than a bug. |
@rjmholt So this tells me that we have a permissions issue somewhere. Our laptops have some "unique" lockdowns so I am not sure how to troubleshoot that... Any ideas? |
@compwiz32 That's excellent. I'm following up now to see if there are any ways in general to do something like turn one of these hangs into a crash or something similar. |
Maybe I can save you some time. I know of issues we have had in the past due to security requirements that block us from interacting with the "Windows Store". If you can think of any reason why VScode may be waiting for an answer from an online MS service, that may be the issue here. I say that knowing that there should not be any talk to an online service just to load a language but throwing it out there as a remote possibility. I will put into place whatever you might come up with for a future test. |
So after looking into this, it looks like there are a couple of avenues to explore:
|
Can I run the user and system versions side by side? I uninstalled the user version to make sure the system version didn't step on or pick up "old bits of code" |
Looks like side-by-side is possible although you might get warnings about it. |
For me nothing helped. I tried all kind of things and I was already running system version. I tried also user version but same issue with 1.10 version. I finally gave up and uninstalled 1.10 and returned back to 1.9 which works perfectly fine. If you have any updates please inform me so I can test. |
I had the same problem and noticed that I had a deleted folder in my vscode workspace. After I removed this folder from the workspace everythin was working fine. |
Hello gents... i am back again... vscode-powershell.log |
I am wondering if there's a permissions issue where the pipe points to. Is there a way to figure out where a pipe is on my machine? |
Just found this thread, I'm running into the same problem on my work machine. It seems to hang on the line
Also, my PowerShell window pops out (it's not integrated). This was working when I first tried it, but stopped a few hours later. It's a shame because this extension is extremely useful for my PowerShell development. |
@compwiz32 I was able to solve my problem by installing PowerShell Core (https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-windows?view=powershell-6) with administrator permissions and then changing the It now starts up correctly! Maybe this will work for you as well :) |
@zachmerrill so are you saying you installed PSCore and then in VSCODE pointed the PS executable path to PSCORE PS Exe ? Just very interesting but I wonder what changes for your everyday PS experience? |
@compwiz32 Correct. I now have two versions of PowerShell installed (PSCore and the version preinstalled on my system). I only use PSCore for the VSCode extension, so it shouldn't affect my day to day too much. Here's the things I tried if you're interested...
Good luck :) |
FYI previous advice from @kristianBirkThim worked for me too. I believe the problem started after upgrading to 1.51.1 with extension version 2020.6.0. |
I was able to resolve this issue by upgrading from PowerShell Core 6 to 7, but it was a lucky guess. The error reporting and resiliency still need a lot of work. |
Sorry but I'm still having this issue. At first it seemed like it went away after formally installing PowerShell 7.1, then switching back to 5.1, but I can't seem to completely shake it. Seems like it particularly occurs when I'm using a second or third window. However it's not consistent. I just updated to 1.53 and that seemed to fix it for the 2 windows I had, but I just opened a 3rd and it's back. Sometimes I'm able to get out of the "Starting PowerShell..." state by switching the version in the runtime config, but it still a pain. |
I had this issue on my Mac and updating PowerShell using these instructions fixed it: https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-macos?view=powershell-7.2 I ran: Reloaded visual studio and it started working again. |
Doesn't look like there's been much action on this one lately. This is my second time running into this issue and for me it is related to the execution policy regarding localMachine. Here is the MS doc regarding the policy: Here is what I run in a powershell command prompt to fix the issue: Most likely the setting here will be: To set it to RemoteSigned, and fixing this issue: |
Same thing happened to me, I tried almost everything you said. |
I run into this issue after I updated PowerShell from 7.1 to 7.3. I have configured VS Code to use Windows PowerShell because it's my default target But sometimes I use PowerShell 7 for some experimental work, so I have PowerShell 7 installed on my machine. All works correctly when I change powerShellDefaultVersion to "PowerShell (x64)" or uninstall PowerShell 7. |
Changing the execution policy for the local machine worked for me, too. I did note, however, that my non-administrator user account had its own execution policy, which overrode the local machine's. All I had to do to fix that was to unset it (as the non-administrator user). Set-ExecutionPolicy -ExecutionPolicy Undefined -Scope CurrentUser |
Hey @compwiz32, I know this issue is from 2018. Is it still reproducing for you? I'm going to mark as "needs feedback" so it will auto-close in a week if I don't hear back from you. For other users posting, if you are having problem today, please file a new issue so we can get back to you. Thanks all! |
Hi guys! I apologize. I thought I closed this issue a long time ago. I do remember this issue and do remember that future builds fixed my issue. definitely no lingering issues... |
Yay, glad to hear that! Thanks for the follow-up. |
Issue Description
I am experiencing a problem with PowerShell extension. I have checked issue #752 and I am confident that the fixes in that bug report are applied.
The PowerShell extension hangs when the second terminal (PowerShell Integrated Console) starts. It never times out and it never crashes, it just stays stuck at "Starting PowerShell..."
I have noticed the issue on another PC in my org so I am wondering if it is an issue with our image build with our laptops but... I can't get anything to show in the logs, so I am stuck trying to figure out what is hanging the extension up.
I enabled diagnostic mode but it doesn't seem to have caught any additional info.
Attached Logs
Start-EditorServices-EditorServices.log
vscode-powershell.log
EditorServices.log
Environment Information
Visual Studio Code
1.29.1
bc24f98b5f70467bc689abf41cc5550ca637088e
x64
PowerShell Information
PS C:\Scripts\Git-Repo\PS-ADHeath> $psversiontable
Name Value
PSVersion 5.1.16299.666
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.16299.666
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Visual Studio Code Extensions
AlanWalk.markdown-toc@1.5.6
CoenraadS.bracket-pair-colorizer-2@0.0.25
formulahendry.code-runner@0.9.5
gerane.Theme-Blackboard@0.0.2
in4margaret.compareit@0.0.2
jprestidge.theme-material-theme@1.0.1
mdickin.markdown-shortcuts@0.9.0
ms-vscode.PowerShell@1.9.0
ms-vscode.wordcount@0.1.0
PKief.material-icon-theme@3.6.1
shd101wyy.markdown-preview-enhanced@0.3.11
streetsidesoftware.code-spell-checker@1.6.10
yzane.markdown-pdf@1.2.0
yzhang.markdown-all-in-one@1.7.0
The text was updated successfully, but these errors were encountered: