Description
System Details
code -v
1.23.1
d0182c3417d225529c6d5ad24b7572815d0de9ac
x64
$pseditor.EditorServicesVersion
1.7.0.0
code --list-extensions --show-versions
AwesomeAutomationTeam.azureautomation@0.6.2
bierner.color-info@0.5.0
DavidAnson.vscode-markdownlint@0.16.0
docsmsft.docs-authoring-pack@0.0.2
docsmsft.docs-markdown@0.0.2
eamodio.gitlens@8.3.0
eriklynd.json-tools@1.0.2
formulahendry.code-runner@0.9.3
ipedrazas.kubernetes-snippets@0.1.9
mindginative.terraform-snippets@2.0.1
mohsen1.prettify-json@0.0.3
ms-azuretools.vscode-azureappservice@0.8.1
ms-azuretools.vscode-azurefunctions@0.9.0
ms-azuretools.vscode-azurestorage@0.3.1
ms-azuretools.vscode-azureterraform@0.2.0
ms-azuretools.vscode-cosmosdb@0.7.1
ms-docfx.DocFX@0.1.3
ms-kubernetes-tools.vscode-kubernetes-tools@0.1.9
ms-mssql.mssql@1.3.1
ms-python.python@2018.4.0
ms-toolsai.vscode-ai@0.1.8
ms-vscode.azure-account@0.4.0
ms-vscode.azurecli@0.4.1
ms-vscode.csharp@1.15.2
ms-vscode.PowerShell@1.7.0
ms-vscode.vscode-azureextensionpack@0.0.9
ms-vsts.team@1.133.0
msazurermtools.azurerm-vscode-tools@0.4.2
mshdinsight.azure-hdinsight@0.0.16
PeterJausovec.vscode-docker@0.0.26
PKief.material-icon-theme@3.4.0
redhat.vscode-yaml@0.0.12
usqlextpublisher.usql-vscode-ext@0.2.13
VisualStudioOnlineApplicationInsights.application-insights@0.4.2
vsciot-vscode.azure-iot-edge@0.3.0
vsciot-vscode.azure-iot-toolkit@0.6.1
$PSVersionTable
Name Value
---- -----
PSVersion 6.1.0-preview.2
PSEdition Core
GitCommitId v6.1.0-preview.2
OS Microsoft Windows 10.0.17672
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Issue Description
When I press F8, nothing happens, I only see output after 30 seconds up to 3 minutes.
The Integrated console just shows the last of the debug output
#-- Waiting for EditorServicesHost to complete execution ---------------------
However if I actually change the ps1 file that is open I see in the powershell extension log , that things are happening.
E.g. formatting and it also shows the language service is connected.
5/19/2018 2:32:24 PM [NORMAL] - Connecting to language service on port 13493...
5/19/2018 2:32:24 PM [NORMAL] - Language service connected.
5/19/2018 2:35:17 PM [VERBOSE] - Formatting on type at position {"line":35,"character":0} -
However the logs in the integrated console/terminal shows the same thing as the logs that I have attached.
#-- Waiting for EditorServicesHost to complete execution ---------------------
The F8 is non responsive. . . the commands are being queued somewhere however since after around ~2 minutes I will see the output.
E.g.
if I have this in the ps1 file, then I press F8 twice, nothing happens, then around 2 minutes later I see the output
gps -id $pid
NPM(K) PM(M) WS(M) CPU(s) Id SI ProcessName
------ ----- ----- ------ -- -- -----------
99 524.29 519.61 101.13 5652 1 pwsh
NPM(K) PM(M) WS(M) CPU(s) Id SI ProcessName
------ ----- ----- ------ -- -- -----------
99 524.38 519.73 101.17 5652 1 pwsh
I can type in the terminal the whole time.
e.g. typing in the terminal/console
Get-date
> Saturday, May 19, 2018 2:39:00 PM
However if I am pressing F8 on the ps1 script, nothing happens again. . . for about 2 minutes. . . then the result returns again.
I have this experience 100% of the time with both ps 6 and ps 5.1.
Sometimes I can write code for up to 15 minutes without this occurring. . . Mostly the Integrated Console is just unusable.
This is not a new issue, it has always been like this. Also I do screen shares with customers that I work with daily and I see the exact same issues with all of them. There are also references to this issue in pretty much Every Video from the PowerShell Conferences in both US and EU that have been published.
If you have a Windows 10 machine try it for yourself, it's easy to repro.
Between VSCode.exe --> winpty-agent.exe --> conhost.exe --> pwsh.exe --> The PowerShell extension --> PowerShell EditorServices I am not really sure where to look.
For the past two weeks I have been trying anything I can think off to work out what is causing the issue. . . including migrating my workflow to use pscore 6.0 and also using the Insider version, plus removing all extensions.
The main reason I am reporting is now is because, I actually decided to turn off the debug logging, incase it was part of the problem. . . so I switched it off. . .
"powershell.developer.editorServicesLogLevel": "Error",
Then for the first time ever, when I actually switched it on again, I actually started to see the diagnostics logs, that I had actually never seen before 😊
"powershell.developer.editorServicesLogLevel": "Diagnostic",
So I hope with these I can actually determine what is causing this long term issue.
Although for some reason the logs only seem to show the startup ? the last thing I see is:
#-- Waiting for EditorServicesHost to complete execution ---------------------
I have tried both
"terminal.integrated.rendererType": "canvas",
and
"terminal.integrated.rendererType": "dom",
these do not make any difference.
My extension are set to auto update, I deleted any extensions that I don't actually use everyday.
I have worked in both VSCode and the VSCode Insiders and this is the same issue on both.
Logs attached, they actually just show extactly what I now see in the console which is up to the following line and then nothing after ?
#-- Waiting for EditorServicesHost to complete execution ---------------------
I am not sure if that is normal of if the editorservices have hung ? The formatting seems to be working so I don't think they have hung, there is just nothing extra in the logs.
One other thing however if I do select a single line of code and then choose Format Selection, then all I see in the status bar is "Formatting PowerShell document …." which also lasts about 2 minutes.
So now if I . . .
-
Press F8 on a line of code 5 times . . . I wait. . .
-
While I am waiting if I do a format selection I see the "Formatting PowerShell document …." . . I wait.
-
After a few minutes, the two both complete at the same time, which I guess is expected.
-
Sometimes (like right now) the format and the F8 work fine/ as I would expect, however the good times only last around another 3 minutes, it starts again then go back to 1) . . . same issue again. I just waited two minutes and it's locked again, I just don't see any new logs anywhere ? only those startup logs ? which I have attached.
If I restart the current session, I see the new editor services startup. . . I see the integrated console has finished loading, I press F8 on the line of code, nothing. it's just the same, I wait. then eventually the command writes out.
One more detail, if I am on the Output "PowerShell extension Log" and I press F8 on the script, it flips be back to the Integrated console/terminal, however there is no output . . . until a minute later, then the results from pressing the F8 returns.
Are there any logs for EditorServices other than what appear to be startup logs?
happy to video screen capture of this or do a screen share. . .