Skip to content

Unable to start Debug Server: Constructor on type [...] not found #562

Closed
@rjmholt

Description

@rjmholt

Trying to get PowerShell Editor Services running with O# 0.19, we've been unable to start the debug server.

In our code, the failure seems to occur here.

It seems we're unable to process the initialize message from the debugger because the Activator can't create the PathFormat type:

[StringEnum]
public readonly partial struct PathFormat
{
public static PathFormat Path { get; } = new PathFormat("path");
public static PathFormat Uri { get; } = new PathFormat("uri");
}

Constructor on type 'System.Nullable`1[[OmniSharp.Extensions.DebugAdapter.Protocol.Models.PathFormat, OmniSharp.Extensions.DebugAdapter, Version=0.19.0.0, Culture=neutral, PublicKeyToken=6d868dff454e6022]]' not found.
   at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) in /_/src/coreclr/System.Private.CoreLib/src/System/RuntimeType.CoreCLR.cs:line 3541
   at System.Activator.CreateInstance(Type type, Object[] args) in /_/src/libraries/System.Private.CoreLib/src/System/Activator.cs:line 31
   at OmniSharp.Extensions.JsonRpc.Serialization.Converters.EnumLikeStringConverter.ReadJson(JsonReader reader, Type objectType, IEnumLikeString existingValue, Boolean hasExistingValue, JsonSerializer serializer) in /_/src/JsonRpc/Serialization/Converters/EnumLikeStringConverter.cs:line 17
   at Newtonsoft.Json.JsonConverter1.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer) in /_/Src/Newtonsoft.Json/JsonConverter.cs:line 126
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue) in /_/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:line 2175
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target) in /_/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:line 1064
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id) in /_/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:line 2448
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) in /_/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:line 589
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) in /_/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:line 349
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) in /_/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:line 205
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) in /_/Src/Newtonsoft.Json/JsonSerializer.cs:line 916
   at Newtonsoft.Json.Linq.JToken.ToObject(Type objectType, JsonSerializer jsonSerializer) in /_/Src/Newtonsoft.Json/Linq/JToken.cs:line 2090
   at OmniSharp.Extensions.JsonRpc.RequestRouterBase1.<RouteRequest>d__5.MoveNext() in /_/src/JsonRpc/RequestRouterBase.cs:line 102

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions