$PSVersionTable:When I open a file with a recognised 'Powershell' extension (.ps1,.psm1,*.psd1 etc) or having typed in some script I tell 'Code' that the language is 'PowerShell' instead of plain text, I get a notice that says 'Initialization Error' in the bottom right hand corner.
When I click on it I get an error in the Error bar that says "Error: Could not start language service:"
[0:2:23] Language server starting...
powershell.exe started --
pid: 928
exe: C:\WINDOWS\Sysnative\WindowsPowerShell\v1.0\powershell.exe
args: C:\Users\myuser\.vscode\extensions\ms-vscode.PowerShell-0.10.1scripts\Start-EditorServices.ps1 -EditorServicesVersion '0.10.1' -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '0.10.1' -BundledModulesPath 'C:\Users\myuser\.vscode\extensions\ms-vscode.PowerShell-0.10.1\modules' -EnableConsoleRepl -LogLevel 'Verbose' -LogPath 'C:\Users\myuser\.vscode\extensions\ms-vscode.PowerShell-0.10.1\logs\1490227343-bdec66a5-f1e8-4d56-9ce5-5e057642a56f1490227309017\EditorServices.log' -SessionDetailsPath 'C:\Users\myuser\.vscode\extensions\ms-vscode.PowerShell-0.10.1sessions\PSES-VSCode-10944'
powershell.exe terminated or terminal UI was closed
[0:3:23] Language server startup failed.
Could not start language service:
Now... I'm in a Domain environment where our Security Policy forced down from 'on high' by Group Policy is that we're in an allsigned environment. I have tried Code and the Powershell Extension on a number of machines now and I always get the same experience.
Incidentally, it appears that the module files:
modules\Plaster\Templates\NewPowerShellManifestModule\Module.psm1
modules\Plaster\Templates\NewPowerShellManifestModule\test\Module.T.ps1
are not signed - I don't know if this is related.
Looks like we might also have a logging bug where we are not appending a \ between the home dir and the .vscode dir e.g. C:\Users\myuser.vscode should really be C:\Users\myuser\.vscode
Oooop. No Keith, that's my bad - I manually edited that output to obfuscate my username in this publicly visible post...
New version of VSCode installed - March 2017 (version 1.11)
Powershell Extension upgraded to 0.12.2
Problem remains as described above - new logs attached.
System Details
Operating system name and version: Windows 10 - x64 - 10.0.14393
VS Code version: 1.11.0
PowerShell extension version: 0.12.2
Output from $PSVersionTable:
PSVersion 5.1.14393.953
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14393.953
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
New version of VSCode installed - May 2017 (version 1.12.2)
Powershell Extension upgraded to 1.1.0
Problem remains as described above - new logs attached.
System Details
Operating system name and version: Windows 10 - x64 - 10.0.14393
VS Code version: 1.12.2
PowerShell extension version: 1.1.0
Output from $PSVersionTable:
PSVersion 5.1.14393.953
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14393.953
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
New logs attached
logs.zip
Thanks @cmcknz77! There's definitely an exception happening during initialization that we're not capturing in a way that you can observe. Can you try these steps:
C:\Users\cmckenzie\.vscode\extensions\ms-vscode.powershell-1.1.0\scripts\Start-EditorServices.ps1 in the editorHopefully an error will be printed so that we can see what exception you're getting. This improvement to the Start-EditorServices script will be included with the next extension update.
Thanks @daviwil . I had same issue with VScode on linux. That did the trick for me!
@Ghoshnik interesting, this script shouldn't have fixed anything, it just prints out more diagnostic information. Can you tell me what version of PowerShell Core you're using on Linux?
Weird.
Name Value
---- -----
PSVersion 6.0.0-beta
PSEdition Core
BuildVersion 3.0.0.0
Thanks! That's the right version to use for now. What was happening before, the Integrated Console just wouldn't start? I'll have to look at my script change a little more closely to see if there's an explanation for why it might have resolved that.
@daviwil Is this the "diagnostic information" your modified Start-EditorServices.ps1 script should be outputting?
[15:30:49] Language server started.
{"debugServicePort":18142,"status":"started","channel":"tcp","languageServicePort":14149}
Connecting to language service on port 14149...
I was getting the Language Server failures this morning and tried your modified script, it seems to have fixed the issue as well, even though I understand it's supposed to just explain it better.
@xandora I was referring to error output in the Integrated Console if there was a crash on startup. The latest version of the PowerShell extension (1.2.1) includes this updated script, were you seeing the startup crash there too before using the script I linked to?
My suspicion is that the problem is being caused by the Start-EditorServices.ps1 script being signed in the official releases. If any of you have a few moments, could you uninstall/reinstall the PowerShell extension and then run the official Start-EditorServices.ps1 script inside of PowerShell.exe? You don't need to worry about the parameters, what I'm looking for is whether you get prompted about whether you want to run a signed script (Run Once should be one of the options).
Thanks!
I'm having the same (or similar) problem. I get "Starting Powershell..." in the lower right forever. My log is attached. I've re-installed the 1.3.2 extension. What else can I try?
Thanks!
-Andy
@andrewlathom could you turn on verbose logging and send new logs?
https://github.com/PowerShell/vscode-powershell#2-capture-verbose-logs-and-send-them-to-us
The current log is helpful but I'm not getting the full picture. Thanks!
Strange that you'd see "Starting PowerShell" forever since it seems that your session has loaded successfully. Looks like you started the debugger at the end of the logs, was the debugger working for you after you did that or did it seem to hang?
Whenever I try to start a script, either with or without the debugger, it doesn't run. I get the little Pause/Stop floating bar, but nothing executes.
@daviwil Cross-posted in #572 after enabling verbose logging and replacing Start-EditorServices.ps1 with https://raw.githubusercontent.com/daviwil/vscode-powershell/eb8b2d31d2fafe5e2e09cdfed7f811c74d9d1bcf/scripts/Start-EditorServices.ps1
Thanks again!
EDIT 6-22-17
Turns out, I was running the Alpha 15 version. Had to upgrade from OS X 10.10 to 10.12 then install v6.0.0-beta.2. The PowerShell integrated console is running like a champ.
Hi. I'm new here, so I hope I'm not violating any unwritten rules or stepping on any toes. I'm a Windows admin by trade and don't know jack-squat about development, so I apologize if I'm not expressing myself properly.
I'm having what I think is the same problem. VSCode itself starts okay but as soon as I open an existing file or try to start a new one I get an error ‘The language service could not be started’. I also get a 'PowerShell Initialization Error' message in the bottom right corner of the VSCode window. I uninstalled and reinstalled everything from scratch this afternoon, but apparently I didn't even do that properly since the few customizations I made were retained.
Is there a solution for this yet? My understanding of the previous posts is that the replacement script @daviwil linked is supposed to gather diagnostic data and isn't actually a fix.
Thanks, regardless.
PS 5, W10 64-bit Ent, VSC 1.14.2 64-bit
I didn't have all the same symptoms you mentioned, but the suggestions in
this thread cleared up my issue.
https://github.com/PowerShell/vscode-powershell/issues/742#issuecomment-301915916
-Andy
On Fri, Jul 21, 2017 at 3:52 PM, CharlesSpencer notifications@github.com
wrote:
Hi. I'm new here, so I hope I'm not violating any unwritten rules or
stepping on any toes. I'm a Windows admin by trade and don't know
jack-squat about development, so I apologize if I'm not expressing myself
properly.I'm having what I think is the same problem. VSCode itself starts okay but
as soon as I open an existing file or try to start a new one I get an error
‘The language service could not be started’. I also get a 'PowerShell
Initialization Error' message in the bottom right corner of the VSCode
window. I uninstalled and reinstalled everything from scratch this
afternoon, but apparently I didn't even do that properly since the few
customizations I made were retained.Is there a solution for this yet? My understanding of the previous posts
is that the replacement script @daviwil https://github.com/daviwil
linked is supposed to gather diagnostic data and isn't actually a fix.Thanks, regardless.
PS 5, W10 64-bit Ent, VSC 1.14.2 64-bit
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/PowerShell/vscode-powershell/issues/603#issuecomment-317096856,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AcHhddUlznaN9vIDi2ngNXFomgQU_Sagks5sQQFxgaJpZM4Ml_fL
.
Interesting. This morning the problem was gone. The only action I've taken was a reboot.
Well, upon further study, the problem is gone IF I start VSCode by clicking the icon. If I right-click and run as Admin, the problem is still there.
@andrewlathom, I'll try the step in the thread you linked to as soon as I can figure out how to sign my profile script in a way that's acceptable to AllSigned restrictions. Thanks.
Had similar symptoms; in my case, it appears to be related to antivirus. McAfee had this to say in my Windows Application Event Log:
ExP:Illegal API Use Blocked an attempt to exploit C:\WINDOWS\SYSTEM32\WINDOWSPOWERSHELL\V1.0\POWERSHELL.EXE, which targeted the AtlComPtrAssign API.
I'll be taking it up with my AV admin.
Bizarrely for me this problem appears to have disappeared after updateing to the latest VSCode code...
Just wanted to check in since a few folks had their issues resolved. Is anyone else still having issues? I'd love some fresh logs if you have them. Thanks!
Thanks for following up... My issue persisted until my IT department added an exclusion in McAfee Endpoint Security's Exploit Prevention module that allows winpty-agent.exe to call PowerShell.exe using the AtlComPtrAssign API.
I don't know if it's possible to change the way the PowerShell console is launched inside of VS Code that makes it more friendly towards McAfee (and possibly other AV products), but I anticipate other McAfee users may run into similar issues in future.
Name | Value
---- | -----
PSVersion | 6.0.2
PSEdition | Core
GitCommitId | v6.0.2
OS | Linux 4.14.31-1-MANJARO #1 SMP PREEMPT Wed Mar 28 21:42:49 UTC 2018
Platform | Unix
PSCompatibleVersions | {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion | 2.3
SerializationVersion | 1.1.0.1
WSManStackVersion | 3.0
When I open a .ps1 file, then get a notice that says 'Initialization Error' in the vscode bottom. The detail log is:
Language server startup failed.
Could not start language service: Timed out waiting for session file to appear.
I change the setting "powershell.developer.editorServicesLogLevel" to "Verbose", and restart vscode, but there is no verb outputs, nothing changed. I think the Start-EditorServices.ps1 doesn't even run. I manually run it like below:
/home/phper/.vscode/extensions/ms-vscode.powershell-1.6.0/scripts/Start-EditorServices.ps1-EditorServicesVersion '1.6.0' -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '1.6.0' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath '/home/phper/.vscode/extensions/ms-vscode.powershell-1.6.0/modules' -EnableConsoleRepl -LogLevel 'Verbose' -LogPath '/tmp/VSCode Crashes/EditorServices.log' -SessionDetailsPath '/tmp/VSCode Crashes' -FeatureFlags @()
And get some error logs:
VERBOSE: /home/phper/.local/share/powershell/Modules
VERBOSE: /usr/local/share/powershell/Modules
VERBOSE: /opt/microsoft/powershell/6.0.2/Modules
VERBOSE: /home/phper/.vscode/extensions/ms-vscode.powershell-1.6.0/modules
VERBOSE: Testing module availability PowerShellGet
VERBOSE: PowerShellGet found
VERBOSE: Testing module availability PowerShellEditorServices 1.6.0
VERBOSE: PowerShellEditorServices 1.6.0 found
VERBOSE: Importing PowerShellEditorServices
VERBOSE: Searching for available socket port for the language service
VERBOSE: Checking port: 19024, attempts remaining 10 --------------------
VERBOSE: Testing availability of port 19024 at address 127.0.0.1 / InterNetwork
VERBOSE: Testing availability of port 19024 at address ::1 / InterNetworkV6
VERBOSE: SocketException on port 19024: System.Net.Sockets.SocketException (0x80004005): Cannot assign requested address
at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)
at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Bind(EndPoint localEP)
at System.Net.Sockets.TcpListener.Start(Int32 backlog)
at CallSite.Target(Closure , CallSite , Object )
VERBOSE: Port: 19024 is NOT available
VERBOSE: Checking port: 10635, attempts remaining 9 --------------------
VERBOSE: Testing availability of port 10635 at address 127.0.0.1 / InterNetwork
VERBOSE: Testing availability of port 10635 at address ::1 / InterNetworkV6
VERBOSE: SocketException on port 10635: System.Net.Sockets.SocketException (0x80004005): Cannot assign requested address
at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)
at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Bind(EndPoint localEP)
at System.Net.Sockets.TcpListener.Start(Int32 backlog)
at CallSite.Target(Closure , CallSite , Object )
VERBOSE: Port: 10635 is NOT available
VERBOSE: Checking port: 17063, attempts remaining 8 --------------------
VERBOSE: Testing availability of port 17063 at address 127.0.0.1 / InterNetwork
VERBOSE: Testing availability of port 17063 at address ::1 / InterNetworkV6
VERBOSE: SocketException on port 17063: System.Net.Sockets.SocketException (0x80004005): Cannot assign requested address
at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)
at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Bind(EndPoint localEP)
at System.Net.Sockets.TcpListener.Start(Int32 backlog)
at CallSite.Target(Closure , CallSite , Object )
VERBOSE: Port: 17063 is NOT available
VERBOSE: Checking port: 10331, attempts remaining 7 --------------------
VERBOSE: Testing availability of port 10331 at address 127.0.0.1 / InterNetwork
VERBOSE: Testing availability of port 10331 at address ::1 / InterNetworkV6
VERBOSE: SocketException on port 10331: System.Net.Sockets.SocketException (0x80004005): Cannot assign requested address
at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)
at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Bind(EndPoint localEP)
at System.Net.Sockets.TcpListener.Start(Int32 backlog)
at CallSite.Target(Closure , CallSite , Object )
VERBOSE: Did not find any available ports!!
Failed to find an open socket port for either the language or debug service.
@amitbha I see you're using Arch. Has the extension ever worked for you?
@rkeithhill your extra logging is working :)
Cannot assign requested address
@tylerl0706 My first time using vscode-powershell extension. It has never worked properly.
@amitbha: That's what I figured... this could very well be a PowerShell or .NET Core issue. We'll have to look deeper.
@janhanekom:
RE: winpty-agent.exe to call PowerShell.exe using the AtlComPtrAssign API
Are you able to see if the PowerShell terminal that ships with VSCode works? In other words, not the PowerShell Integrated Console in VSCode, but the normal PowerShell console in VSCode.
@amitbha I'm not on Arch so it's going to be difficult to repro so I'm going to need your help.
Here's the function that tests the availability of a port:
function Test-PortAvailability {
param(
[Parameter(Mandatory=$true)]
[int]
$PortNumber
)
$portAvailable = $true
try {
if ($isPS5orLater) {
$ipAddresses = [System.Net.Dns]::GetHostEntryAsync("localhost").Result.AddressList
}
else {
$ipAddresses = [System.Net.Dns]::GetHostEntry("localhost").AddressList
}
foreach ($ipAddress in $ipAddresses)
{
Log "Testing availability of port ${PortNumber} at address ${ipAddress} / $($ipAddress.AddressFamily)"
$tcpListener = New-Object System.Net.Sockets.TcpListener @($ipAddress, $PortNumber)
$tcpListener.Start()
$tcpListener.Stop()
}
}
catch [System.Net.Sockets.SocketException] {
$portAvailable = $false
# Check the SocketErrorCode to see if it's the expected exception
if ($_.Exception.SocketErrorCode -eq [System.Net.Sockets.SocketError]::AddressAlreadyInUse) {
Log "Port $PortNumber is in use."
}
else {
Log "SocketException on port ${PortNumber}: $($_.Exception)"
}
}
$portAvailable
}
Can you tell me the exact line that causes the exception? You will probably need to remove the try/catch.
Let me know if you need help.
@tylerl0706 I remove the try/catch, and the error message is:
An error occurred while starting PowerShell Editor Services:
Exception calling "Start" with "0" argument(s): "Cannot assign requested address"
at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)
at System.Management.Automation.PSScriptCmdlet.RunClause(Action`1 clause, Object dollarUnderbar, Object inputToProcess)
at System.Management.Automation.PSScriptCmdlet.DoEndProcessing()
at System.Management.Automation.CommandProcessorBase.Complete()
Cannot assign requested address
at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)
at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Bind(EndPoint localEP)
at System.Net.Sockets.TcpListener.Start(Int32 backlog)
at CallSite.Target(Closure , CallSite , Object )
I print the parameters before tcpListener:
write-host "$ipAddress, $PortNumber"
$tcpListener = New-Object System.Net.Sockets.TcpListener @($ipAddress, $PortNumber)
$tcpListener.Start()
$tcpListener.Stop()
and the ouput is:
127.0.0.1, 28897
::1, 28897
127.0.0.1, 23946
::1, 23946
127.0.0.1, 11824
::1, 11824
127.0.0.1, 13519
::1, 13519
127.0.0.1, 10183
::1, 10183
127.0.0.1, 21058
::1, 21058
127.0.0.1, 26056
::1, 26056
127.0.0.1, 29872
::1, 29872
127.0.0.1, 13568
::1, 13568
127.0.0.1, 17054
::1, 17054
127.0.0.1, 24736
::1, 24736
127.0.0.1, 10205
::1, 10205
127.0.0.1, 18065
::1, 18065
127.0.0.1, 24230
::1, 24230
127.0.0.1, 23751
::1, 23751
127.0.0.1, 13816
::1, 13816
127.0.0.1, 28652
::1, 28652
127.0.0.1, 18357
::1, 18357
127.0.0.1, 12179
::1, 12179
127.0.0.1, 23602
::1, 23602
@amitbha: So do all of those values throw the exception?
@tylerl0706
Yes, all of them.
@amitbha I think this might be a bug on the .NET Core team. For some reason, it's having a hard time listening on ports. Here's what I think you should do:
Create a small C# console app that just does the following:
var tcpListener = new System.Net.Sockets.TcpListener("127.0.0.1", "12179");
tcpListener.Start();
tcpListener.Stop();
var tcpListener = new System.Net.Sockets.TcpListener("::1", "12179");
tcpListener.Start();
tcpListener.Stop();
I might not have the syntax perfectly.
Just use PowerShell
$tcpListener = New-Object System.Net.Sockets.TcpListener @("127.0.0.1", "12179")
$tcpListener.Start()
$tcpListener.Stop()
$tcpListener = New-Object System.Net.Sockets.TcpListener @("::1", "12179")
$tcpListener.Start()
$tcpListener.Stop()
Put that code and the exception thrown in a new issue here:
https://github.com/dotnet/corefx
along with anything else they need. If you're using the PowerShell example, mention that you're only using PowerShell because you don't have the .NET sdk installed.
Also, be sure to link this issue with that issue.
@tylerl0706
Thanks for your patience. This code exactly find where the problem is:
1 $tcpListener = New-Object System.Net.Sockets.TcpListener @("127.0.0.1", "12179")
2 $tcpListener.Start()
3 $tcpListener.Stop()
4
5 $tcpListener = New-Object System.Net.Sockets.TcpListener @("::1", "12179")
6 $tcpListener.Start()
7 $tcpListener.Stop()
Line 6 throws the exception:
Exception calling "Start" with "0" argument(s): "Cannot assign requested address"
At tcp.test.ps1:6 char:1
$tcpListener.Start()
CategoryInfo : NotSpecified: (:) [], MethodInvocationException
FullyQualifiedErrorId : SocketException
I remember that, I disabled ipv6 on all network interfaces in sysctl.conf like this:
net.ipv6.conf.all.disable_ipv6 = 1
So, bug or not?
@amitbha Can you test this code:
function Log([string[]]$msg) {
$msg | Write-Verbose
}
function Test-PortAvailability {
param(
[Parameter(Mandatory=$true)]
[int]
$PortNumber
)
if ($isPS5orLater) {
$ipAddresses = [System.Net.Dns]::GetHostEntryAsync("localhost").Result.AddressList
}
else {
$ipAddresses = [System.Net.Dns]::GetHostEntry("localhost").AddressList
}
foreach ($ipAddress in $ipAddresses)
{
try {
Log "Testing availability of port ${PortNumber} at address ${ipAddress} / $($ipAddress.AddressFamily)"
$tcpListener = New-Object System.Net.Sockets.TcpListener @($ipAddress, $PortNumber)
$tcpListener.Start()
$tcpListener.Stop()
return $ipAddress
}
catch [System.Net.Sockets.SocketException] {
# Check the SocketErrorCode to see if it's the expected exception
if ($_.Exception.SocketErrorCode -eq [System.Net.Sockets.SocketError]::AddressAlreadyInUse) {
Log "Port $PortNumber is in use."
}
else {
Log "SocketException on port ${PortNumber}: $($_.Exception)"
}
}
}
$null
}
Test-PortAvailability 12179
The problem is that we test both ipv4 and ipv6 and if either of those fail, then we fail the port. That is not correct. Whichever one succeeds first, we should indicate that port is available but not only that the port is available but which address family we should use to connect. Hence the above returns $ipAddress on sucess and $null on failure.
@rkeithhill The code runs well. The output is:
Testing availability of port 12179 at address 127.0.0.1 / InterNetwork
AddressFamily : InterNetwork
ScopeId :
IsIPv6Multicast : False
IsIPv6LinkLocal : False
IsIPv6SiteLocal : False
IsIPv6Teredo : False
IsIPv4MappedToIPv6 : False
Address : 16777343
IPAddressToString : 127.0.0.1
[Done] exited with code=0 in 1.052 seconds
BTW, strangely, the Write-Verbose didn't output anything, so I changed it to Write-Host.
I updated the 'Start-EditorServices.ps1' with the new code, and open the vscode In hope. But the problem 'Language server startup failed' persisted.
I checked the "sessions" directory, and there is no session file.
I copy the command in output and manually run it ike below:
/home/phper/.vscode/extensions/ms-vscode.powershell-1.6.0/scripts/Start-EditorServices.ps1-EditorServicesVersion '1.6.0' -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '1.6.0' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath '/home/phper/.vscode/extensions/ms-vscode.powershell-1.6.0/modules' -EnableConsoleRepl -LogLevel 'Verbose' -LogPath '/home/phper/.vscode/extensions/ms-vscode.powershell-1.6.0/logs/EditorServices.log' -SessionDetailsPath '/home/phper/.vscode/extensions/ms-vscode.powershell-1.6.0/sessions/PSES-VSCode-17491-944549' -FeatureFlags @()
And the session file is created sucessfully! Its content is:
{"channel":"tcp","status":"started","languageServicePort":13399,"debugServicePort":10317}
👽
Thanks for trying that. I'll submit a PR later tonight for this change to the script. The callsite for the Test-Availability function has to change to capture the IP address and pass it up to its caller.
@rkeithhill didn't we recently make a change to check for IP v6 as well as IP v4 because sometimes a port was already taken with IP v6 but would show available to IP v4?
Yup and this proves that one of the two primary address families may not be available on a machine. Now need to fix it to handle that case without failing. :-)
@amitbha The fix will be included in the next release - going out next week.