poshtools-docs
poshtools-docs copied to clipboard
Critical failure during autocompletion
I did the following then pressed tab, now it does no auto filling which requires me to restart the vscode host:

And received the following output:
Scheduling command for main runspace: $Commands = Get-Command '$' -ErrorAction SilentlyContinue; if ($Commands) { try { [System.Management.Automation.ProxyCommand]::Create((New-Object System.Management.Automation.CommandMetaData $Commands)) } catch { } } else { '' }
Scheduling command for main runspace: $Commands = Get-Command '[]' -ErrorAction SilentlyContinue; if ($Commands) { try { [System.Management.Automation.ProxyCommand]::Create((New-Object System.Management.Automation.CommandMetaData $Commands)) } catch { } } else { '' }
Exception in server: System.ArgumentOutOfRangeException: Length cannot be less than zero. (Parameter 'length')
at System.String.Substring(Int32 startIndex, Int32 length)
at PowerShellProTools.Host.Refactoring.IntroduceUsing.Refactor(TextEditorState state, Ast ast, IEnumerable`1 properties)+MoveNext() in D:\a\1\s\PowerShellProTools.Host\Refactoring\IntroduceUsing.cs:line 29
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeList(JsonWriter writer, IEnumerable values, JsonArrayContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)
at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType)
at Newtonsoft.Json.JsonConvert.SerializeObjectInternal(Object value, Type type, JsonSerializer jsonSerializer)
at PowerShellToolsPro.PoshToolsServer.Start(String pipeName) in D:\a\1\s\PowerShellProTools.Host\PoshToolsServer.cs:line 110