You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Extension/Integrated Console hangs on startup before prompt #2014
Thanks for opening an issue. If we can find a way to reproduce it, we can hopefully fix it.
the terminal window won't load after five minutes with 30 gb of RAM
This is likely not a performance issue.
A couple of questions:
If you go to the Integrated Console and press Enter, does it then continue?
When did this last work for you? Did it stop working when VSCode (not the extension) updated? Or when the PowerShell extension updated at the end of May?
In Jason Dempsey (@metalmensch)'s case, does it display anything in the terminal? Do you have a PowerShell file open?
In MarkKharitonov's case, what operating system (and version) are you running?
If you try to restart the PowerShell extension session (with Ctrl+Shift+PPowerShell: Restart Current Session), what happens?
If you open a native powershell or pwsh terminal, does a similar problem occur?
We're aware of a Windows bug that's been affecting recent VSCode builds in which the terminal doesn't behave properly, so that's my current suspicion.
If you go to the Integrated Console and press Enter, does it then continue?
No, still stuck at PowerShell Integrated Console
When did this last work for you? Did it stop working when VSCode (not the extension) updated? Or when the PowerShell extension updated at the end of May?
Sorry, but I do not know.
In MarkKharitonov's case, what operating system (and version) are you running?
I have two machines. On the "good" the Powershell console opens OK., On the "bad" - it is stuck. In both cases it is Windows 10.
Here is the info: "Bad" Machine
Powershell Integrated Console hangs, pressing Enter does not help. At least not in the first N minutes, where N is sizeable (10?) VS Code
Name: PowerShell
Id: ms-vscode.powershell
Description: Develop PowerShell scripts in Visual Studio Code!
Version: 2019.5.0
Publisher: Microsoft
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-vscode.PowerShell
Name: PowerShell
Id: ms-vscode.powershell
Description: Develop PowerShell scripts in Visual Studio Code!
Version: 2019.5.0
Publisher: Microsoft
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-vscode.PowerShell
If you try to restart the PowerShell extension session (with Ctrl+Shift+P PowerShell: Restart Current Session), what happens?
Same thing - it hangs.
If you open a native powershell or pwsh terminal, does a similar problem occur?
Actually on the "bad" machine hitting many times Enter does force the console to show the prompt. So, yes - hitting multiple times Enter shows the console. But, it does not load the profile.
Which profile is that? The PowerShell extension looks for the profile in ~\Documents\PowerShell\Microsoft.VSCode_profile.ps1. I assume this works on the good machine?
Note that once the prompt is shown explicitly loading $PROFILE works fine.
Ohhhh, as in it loads once you press Enter?
Yeah that's because this Windows bug just stops the startup from proceeding (it's a bug in the Windows console APIs), before it can get to the profile execution stage. It's like if you put Wait-Debugger at the start of your profile.
The fix lies below the extension -- it's something we depend on VSCode and Windows for. From what I can tell, the fix is to run Windows update.
Does anyone have a solution for this? I've got the same "Timed out waiting for session file to appear" error, and the extension reports there was an error during session initialization.
EDIT: Looks like it works if I switch to PS 5.1. There's something it doesn't seem to like about PowerShell Core on my machine. 🤔
For those of you on Windows PowerShell that see this issue, can you please send me your event logs for Windows PowerShell? I wonder if that has anything important... ALSO If you see the issue & you have an anti-virus, can you please check the logs of your AV for anything suspicious?
Thanks for your patience... this has been very hard to troubleshoot without a repro on my end.
From my side the problem has been solved by running x86 version of the
language extension.
x64 version always hangs.
But, I also have to mention that my corporate laptop has security component
(like beyondtrust privilege guard) that is upgraded very often without
notification.
So, I don't know if these upgrades have not also help solving this issue.
HTH
Le jeu. 2 avr. 2020 à 19:54, Tyler James Leonhardt <[email protected]>
a écrit :
From my side the problem has been solved by running x86 version of the language extension. x64 version always hangs. But, I also have to mention that my corporate laptop has security component (like beyondtrust privilege guard) that is upgraded very often without notification. So, I don't know if these upgrades have not also help solving this issue. HTH Le jeu. 2 avr. 2020 à 19:54, Tyler James Leonhardt [email protected] a écrit : …
For those of you on Windows PowerShell that see this issue, can you please send me your event logs for Windows PowerShell? I wonder if that has anything important... ALSO If you see the issue & you have an anti-virus, can you please check the logs of your AV for anything suspicious? Thanks for your patience... this has been very hard to troubleshoot without a repro on my end. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#2014 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJCYS2D6P443SR7PXVZ5UY3RKTGONANCNFSM4HVICWCA .
Hi,
You're right about BeyondTrust Privilege Management having something to do with this. I could not find anything in its' logs that would point to this issue though.
This issue went away after we upgraded to BeyondTrust Privilege Management for Windows (x64) 5.6.126.0. Previously we had 5.4.230.0 and I could reproduce the issue on a clean image with just Privilege Management 5.4.230.0, Visual Studio Code 1.45.1 and the PowerShell extension 2020.4.0 installed.
Stopping the "Avecto Defendpoint Service" service also makes the issue go away (that's the older name for the product).
If anyone's still running into BeyondTrust/Avecto issues, we're following up on that in #3077, since there's new discussion on it. I'm going to close this issue now, so we can deduplicate discussions.
Activity
MarkKharitonov commentedon Jun 6, 2019
I second this motion. Was about to open an issue myself. The console window just shows PowerShell Integrated Console and that's it.
rjmholt commentedon Jun 6, 2019
Thanks for opening an issue. If we can find a way to reproduce it, we can hopefully fix it.
This is likely not a performance issue.
A couple of questions:
PowerShell: Restart Current Session), what happens?powershellorpwshterminal, does a similar problem occur?We're aware of a Windows bug that's been affecting recent VSCode builds in which the terminal doesn't behave properly, so that's my current suspicion.
rjmholt commentedon Jun 6, 2019
See also: #1795 (comment)
metalmensch commentedon Jun 6, 2019
MarkKharitonov commentedon Jun 7, 2019
I would like to answer the questions:
No, still stuck at PowerShell Integrated Console
Sorry, but I do not know.
I have two machines. On the "good" the Powershell console opens OK., On the "bad" - it is stuck. In both cases it is Windows 10.
Here is the info:
"Bad" Machine
Powershell Integrated Console hangs, pressing Enter does not help. At least not in the first N minutes, where N is sizeable (10?)
VS Code
Powershell extension
"Good" Machine
VS Code
Powershell extension
Same thing - it hangs.
No.
rjmholt commentedon Jun 7, 2019
Hmmm it certainly looks like the only difference between machines is the Windows version (which implies it may be the Windows bug).
Another thing it might be worth doing is turning the logging up to Diagnostic and seeing how far you get through startup
MarkKharitonov commentedon Jun 7, 2019
Actually on the "bad" machine hitting many times Enter does force the console to show the prompt. So, yes - hitting multiple times Enter shows the console. But, it does not load the profile.
I will get the logs later.
rjmholt commentedon Jun 7, 2019
Yeah that sounds like the relevant Windows bug.
Which profile is that? The PowerShell extension looks for the profile in
~\Documents\PowerShell\Microsoft.VSCode_profile.ps1. I assume this works on the good machine?MarkKharitonov commentedon Jun 7, 2019
Yes, it does not load the
$PROFILE, whatever it should be in this context. Does load on the "good" machine.Note that once the prompt is shown explicitly loading
$PROFILEworks fine.rjmholt commentedon Jun 7, 2019
Ohhhh, as in it loads once you press Enter?
Yeah that's because this Windows bug just stops the startup from proceeding (it's a bug in the Windows console APIs), before it can get to the profile execution stage. It's like if you put
Wait-Debuggerat the start of your profile.The fix lies below the extension -- it's something we depend on VSCode and Windows for. From what I can tell, the fix is to run Windows update.
38 remaining items
dotnetcanuck commentedon Mar 31, 2020
Does anyone have a solution for this? I've got the same "Timed out waiting for session file to appear" error, and the extension reports there was an error during session initialization.
EDIT: Looks like it works if I switch to PS 5.1. There's something it doesn't seem to like about PowerShell Core on my machine. 🤔
jbayardo commentedon Apr 1, 2020
Having the same issue too!
TylerLeonhardt commentedon Apr 2, 2020
For those of you on Windows PowerShell that see this issue, can you please send me your event logs for Windows PowerShell? I wonder if that has anything important... ALSO If you see the issue & you have an anti-virus, can you please check the logs of your AV for anything suspicious?
Thanks for your patience... this has been very hard to troubleshoot without a repro on my end.
oliviermasson commentedon Apr 3, 2020
astratom commentedon May 27, 2020
Hi,
You're right about BeyondTrust Privilege Management having something to do with this. I could not find anything in its' logs that would point to this issue though.
This issue went away after we upgraded to BeyondTrust Privilege Management for Windows (x64) 5.6.126.0. Previously we had 5.4.230.0 and I could reproduce the issue on a clean image with just Privilege Management 5.4.230.0, Visual Studio Code 1.45.1 and the PowerShell extension 2020.4.0 installed.
Stopping the "Avecto Defendpoint Service" service also makes the issue go away (that's the older name for the product).
rjmholt commentedon Dec 3, 2020
If anyone's still running into BeyondTrust/Avecto issues, we're following up on that in #3077, since there's new discussion on it. I'm going to close this issue now, so we can deduplicate discussions.