Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Critical failure during autocompletion #14

Open
hecflores opened this issue Feb 3, 2021 · 0 comments
Open

Critical failure during autocompletion #14

hecflores opened this issue Feb 3, 2021 · 0 comments

Comments

@hecflores
Copy link

I did the following then pressed tab, now it does no auto filling which requires me to restart the vscode host:

image

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant