PowerShell / vscode-powershell

Provides PowerShell language and debugging support for Visual Studio Code
https://marketplace.visualstudio.com/items/ms-vscode.PowerShell
MIT License
1.69k stars 481 forks source link

PowerShell process CPU spikes, terminates #1134

Open Rhywun opened 6 years ago

Rhywun commented 6 years ago

System Details

Copy / paste the following commands into the PowerShell Integrated Console, and paste the output here:

-> code -v
1.19.1
0759f77bb8d86658bc935a10a64f6182c5a1eeba
x64
-> $pseditor.EditorServicesVersion

Major  Minor  Build  Revision
-----  -----  -----  --------
1      5      1      0

-> code --list-extensions --show-versions
bibhasdn.unique-lines@1.0.0
DotJoshJohnson.xml@1.9.2
Ionide.Ionide-fsharp@3.15.4
jsynowiec.vscode-insertdatestring@2.2.0
justusadam.language-haskell@2.4.0
ms-vscode.csharp@1.13.1
ms-vscode.PowerShell@1.5.1
sensourceinc.vscode-sql-beautify@0.0.4
UCL.haskelly@0.4.29

Issue Description

My powershell.exe process routinely shoots up to at least 25% CPU when I attempt to send a statement to the integrated console, and the statement takes 10-15 seconds to execute - but only after several minutes of inactivity in the editor. Subsequent immediate attempts execute immediately unless I let several more minutes go by.

Looking at the logs now, it seems like the PowerShell process keeps shutting down. Is that normal?

Attached Logs

logs.zip

JamesLear92 commented 6 years ago

I think I am getting something similar; it seems that when I launch a script from vscode, one of my CPU cores maxes out for a short while and memory shoots up to 1GB. But worse than this, sometimes it ends up so that when I launch a powershell terminal outside of VSCode, it maxes out a core, and then shoots to 1GB memory but doesn't stop. The entire console becomes very unresponsive.

Closing VSCode and the powershell windows, and then starting again seems to resolve it.