JaneySprings / DotNet.Meteor

A VSCode extension that can run and debug .NET apps (Xamarin, MAUI, Avalonia)
https://marketplace.visualstudio.com/items?itemName=nromanov.dotnet-meteor
MIT License
269 stars 10 forks source link

Version 5.60 has JSON Deserializer error when trying to process Profiler Mode #127

Closed ajay-mundi closed 2 weeks ago

ajay-mundi commented 2 weeks ago

Seems to be an issue processing the launch.json specifically the profiler mode attribute. I get the issues regardless of if i set the property to "None", "trace" or "gcdump". Version 5.50 works as expected.

Launch.Json { "name": "(simX64) .NET Meteor Debugger", "type": "dotnet-meteor.debugger", "request": "launch", "device": { "serial": "${command:dotnet-meteor.activeDeviceSerial}", "runtime_id": "iossimulator-x64", "platform": "ios", "is_emulator": true, }, "profilerMode": "gcdump", "preLaunchTask": "Build without runtimeId" }

Tasks.Json

{ "version": "2.0.0", "tasks": [ { "type": "dotnet-meteor.task", "target": "build", "label": "Build without runtimeId", "args": [ // It removes auto provided value "-p:RuntimeIdentifier=" ], "group": { "kind": "build", "isDefault": true } } ] }

Error Log {"command":"initialize","arguments":{"clientID":"vscode","clientName":"Visual Studio Code","adapterID":"dotnet-meteor.debugger","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"en","supportsProgressReporting":true,"supportsInvalidatedEvent":true,"supportsMemoryReferences":true,"supportsArgsCanBeInterpretedByShell":true,"supportsMemoryEvent":true,"supportsStartDebuggingRequest":true},"type":"request","seq":1} 11:13:48.0088|--> R (initialize-1): {"type":"response","request_seq":1,"success":true,"command":"initialize","body":{"supportsFunctionBreakpoints":true,"supportsConditionalBreakpoints":true,"supportsHitConditionalBreakpoints":true,"supportsEvaluateForHovers":true,"exceptionBreakpointFilters":[{"filter":"all","label":"All Exceptions","description":"Break when an exception is thrown.","supportsCondition":true,"conditionDescription":"Comma-separated list of exception types to break on. Example: System.Exception."}],"supportsCompletionsRequest":true,"completionTriggerCharacters":["."],"additionalModuleColumns":[],"supportedChecksumAlgorithms":[],"supportsExceptionOptions":true,"supportsExceptionInfoRequest":true,"supportsLogPoints":true,"supportsTerminateRequest":true,"supportsExceptionFilterOptions":true},"seq":1} 11:13:48.0181|<-- C (launch-2): {"command":"launch","arguments":{"name":"(simX64) .NET Meteor Debugger","type":"dotnet-meteor.debugger","request":"launch","device":{"serial":"DDA64245-F0EF-48AA-9F82-AF2669B29898","runtime_id":"iossimulator-x64","platform":"ios","is_emulator":true},"profilerMode":"gcdump","preLaunchTask":"Build without runtimeId","__configurationTarget":6,"noDebug":true,"project":{"name":"AppName","path":"apppath","frameworks":["net8.0-ios"," net8.0-android"],"configurations":["Debug","Release"]},"configuration":"Debug","program":"appdebugfolderpath/net8.0-ios/iossimulator-x64/appname.app","skipDebug":true,"debuggingPort":0,"uninstallApp":true,"reloadHost":9988,"profilerPort":9000,"debuggerOptions":{"evaluationOptions":{"evaluationTimeout":1000,"memberEvaluationTimeout":5000,"allowTargetInvoke":true,"allowMethodEvaluation":true,"allowToStringCalls":true,"flattenHierarchy":false,"groupPrivateMembers":true,"groupStaticMembers":true,"useExternalTypeResolver":true,"integerDisplayFormat":"Decimal","currentExceptionTag":"$exception","ellipsizeStrings":true,"ellipsizedLength":260,"StackFrameFormat":{}},"stepOverPropertiesAndOperators":false,"projectAssembliesOnly":true,"automaticSourceLinkDownload":true,"symbolSearchPaths":[],"sourceCodeMappings":{},"searchMicrosoftSymbolServer":false},"__sessionId":"b727f781-7f79-40cf-a290-e4d4bfc89910"},"type":"request","seq":2} 11:13:48.0519|[Handled] The JSON value could not be converted to DotNet.Meteor.Debug.LaunchConfiguration+ProfilerMode. Path: $ | LineNumber: 0 | BytePositionInLine: 8.: System.Text.Json.JsonException: The JSON value could not be converted to DotNet.Meteor.Debug.LaunchConfiguration+ProfilerMode. Path: $ | LineNumber: 0 | BytePositionInLine: 8. at System.Text.Json.ThrowHelper.ThrowJsonException(String message) at System.Text.Json.Serialization.Converters.EnumConverter1.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options) at System.Text.Json.Serialization.JsonConverter1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) at System.Text.Json.Serialization.JsonConverter1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state) at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan1 utf8Json, JsonTypeInfo jsonTypeInfo, Nullable1 actualByteCount) at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan1 json, JsonTypeInfo jsonTypeInfo) at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options) at DotNet.Meteor.Debug.Extensions.ServerExtensions.ToValue[T](JToken jtoken) in /Users/runner/work/1/s/src/DotNet.Meteor.Debug/Extensions/ServerExtensions.cs:line 126 at DotNet.Meteor.Debug.LaunchConfiguration..ctor(Dictionary2 configurationProperties) in /Users/runner/work/1/s/src/DotNet.Meteor.Debug/LaunchConfiguration.cs:line 31 at DotNet.Meteor.Debug.DebugSession.<>c__DisplayClass7_0.<HandleLaunchRequest>b__0() in /Users/runner/work/1/s/src/DotNet.Meteor.Debug/DebugSession.cs:line 65 at DotNet.Meteor.Debug.Extensions.ServerExtensions.DoSafe[T](Func1 handler, Action finalizer) in /Users/runner/work/1/s/src/DotNet.Meteor.Debug/Extensions/ServerExtensions.cs:line 93 11:13:48.0569|--> R (launch-2): {"type":"response","request_seq":2,"success":false,"command":"launch","message":"The JSON value could not be converted to DotNet.Meteor.Debug.LaunchConfiguration+ProfilerMode. Path: $ | LineNumber: 0 | BytePositionInLine: 8.","body":{"error":{"id":0,"format":"The JSON value could not be converted to DotNet.Meteor.Debug.LaunchConfiguration+ProfilerMode. Path: $ | LineNumber: 0 | BytePositionInLine: 8.","url":"file:///Users/ajaymundi/.vscode/extensions/nromanov.dotnet-meteor-5.6.0-darwin-arm64/extension/bin/Debug/logs/Debug.log"}},"seq":2} 11:13:48.0602|<-- C (disconnect-3): {"command":"disconnect","arguments":{"restart":false},"type":"request","seq":3} 11:13:48.0631|--> R (disconnect-3): {"type":"response","request_seq":3,"success":true,"command":"disconnect","body":{},"seq":3}

JaneySprings commented 2 weeks ago

Hi @ajay-mundi ! Yeah, sorry, I have lost some code =) Fixed in 5.6.1

ajay-mundi commented 2 weeks ago

Awesome thank you, and thank you for this extension it is extremely helpful!