Skip to content

Commit a5a8c3b

Browse files
committed
fix decompiledSourceInfo deserialization on linux
1 parent f13a899 commit a5a8c3b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/SharpIDE.Application/Features/Debugging/DebuggingService.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,11 @@ public async Task<DebuggerSessionId> Attach(int debuggeeProcessId, DebuggerExecu
8787
}
8888
var additionalProperties = @event.AdditionalProperties;
8989
// source, line, column
90-
if (additionalProperties.Count is not 0)
90+
if (additionalProperties?.Count is > 0)
9191
{
92-
var filePath = additionalProperties?["source"]?["path"]!.Value<string>()!;
93-
var line = (additionalProperties?["line"]?.Value<int>()!).Value;
94-
var decompiledSourceInfo = additionalProperties?["decompiledSourceInfo"]?.ToObject<DecompiledSourceInfo>();
92+
var filePath = additionalProperties["source"]?["path"]!.Value<string>()!;
93+
var line = (additionalProperties["line"]?.Value<int>()!).Value;
94+
var decompiledSourceInfo = additionalProperties.GetValueOrDefault("decompiledSourceInfo")?.ToObject<DecompiledSourceInfo>();
9595
var executionStopInfo = new ExecutionStopInfo { FilePath = filePath, Line = line, ThreadId = @event.ThreadId!.Value, Project = project, DecompiledSourceInfo = decompiledSourceInfo };
9696
GlobalEvents.Instance.DebuggerExecutionStopped.InvokeParallelFireAndForget(executionStopInfo);
9797
}

0 commit comments

Comments
 (0)