robertaachenw / solidity-debugger

40 stars 5 forks source link

Not selecting 'enable' when setting the JSON RPC address for the first time will result in a parsing failure of the configuration file. #9

Open ss22219 opened 1 year ago

ss22219 commented 1 year ago

Settings:

{
    "solc": "0.8.20",
    "sourceDirs": [
        "."
    ],
    "entryPoint": "DbgEntry.constructor",
    "fork": {
        "url": "http://192.168.2.229:8545"
    }
}

stack:

Newtonsoft.Json.JsonSerializationException: Required property 'enable' not found in JSON. Path 'fork', line 1, position 214.
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EndProcessProperty(Object newObject, JsonReader reader, JsonObjectContract contract, Int32 initialDepth, JsonProperty property, PropertyPresence presence, Boolean setDefaultValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value)
   at Meadow.Shared.SdbgProject.GetContractJson(String contractName) in /root/sdbg/SolidityDebugger/Meadow.Shared/SdbgProject.cs:line 80
   at Meadow.DebugSolSources.AppOptions.ParseSdbgArgs(ProcessArgs args) in /root/sdbg/SolidityDebugger/SolidityDebugger/AppOptions.cs:line 54
   at Meadow.DebugSolSources.AppOptions.ParseProcessArgs(String[] args) in /root/sdbg/SolidityDebugger/SolidityDebugger/AppOptions.cs:line 132
   at Meadow.DebugSolSources.Program.Main(String[] args) in /root/sdbg/SolidityDebugger/SolidityDebugger/Program.cs:line 36
   at Meadow.DebugSolSources.Program.<Main>(String[] args)