Visual Studio Code extension never loads

Hi, I’ve pull the latester update for the crtl+c fix ( which is working perfectly on a second computer! ) On my work computer, the extension never loads:

I’ve tried CTRL+SHIFT+P to Display license information, this does not work either. Can this be linked to my company VPN? It was working fine this morning prior to the reload of the extension post update.

Tool: Visual Studio, Visual Studio Code, PSScriptPad, PowerShell Module

If you look in the VS Code output pane, you should be able to see what is curently happening inside the extension.

Click the output tab and then click the drop down on the right and select PowerShell Pro Tools. Can you send the output of that log?

Note that one of the changes in this version was to resolve a threading issue during activation. More info about that here: VSCode PPT never fully loads - #9 by russ

Found the pane… nothing much happening there… just :

Starting PowerShell Pro Tools host from: c:\Users\xxx\.vscode\extensions\ironmansoftware.powershellprotools-5.28.6\out\windows\PowerShellProTools.Host.exe}
Process started
[15/06/2021 15:19:17] connect

seems to be the same on all computers now. I’ll try with a 4G connection to rule out internet issues on my side.

It stays on that log. I’ve then clicked on intellisense and got his:

[15/06/2021 15:25:32] Executing command: [PowerShellProTools.IntelliSenseManager]::DisablePsesIntellisense()

[15/06/2021 15:25:32] Error executing PowerShell: Exception calling "DisablePsesIntellisense" with "0" argument(s): "Object reference not set to an instance of an object."

[15/06/2021 15:25:32] Exception running command: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.

 ---> System.NullReferenceException: Object reference not set to an instance of an object.

   at PowerShellToolsPro.PoshToolsServer.DisablePsesIntelliSense(String options) in D:\a\1\s\HostInjection\PoshToolsServer.cs:line 615

   --- End of inner exception stack trace ---

   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)

   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

   at PowerShellToolsPro.PoshToolsServer.Start(String pipeName) in D:\a\1\s\HostInjection\PoshToolsServer.cs:line 122

Switching to 4G internet didn’t have any impact on the problem.

I can also reproduce this on one machine but not another…

I think it has to be related to this: Awaiting Terminal processId never returns value on Windows · Issue #91905 · microsoft/vscode · GitHub

Currently looking into it.

1 Like

Thanks glad to hear I’m not an isolated case. I’ll stand by for any development.

Can you please upgrade to 5.28.7 to see if it is resolved for me? Both my machines are loading correctly now.

I’ve just tested and I confirm it is now working properly again on both my machines! Thanks a lot for your fast fixing of the issue!

1 Like