Skip to content

Commit

Permalink
Fix the debugger (#1548)
Browse files Browse the repository at this point in the history
  • Loading branch information
wixoaGit authored Dec 7, 2023
1 parent 8b5f5a2 commit 4236e96
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
using System.Text.Json.Serialization;
using JetBrains.Annotations;

namespace OpenDreamRuntime.Procs.DebugAdapter.Protocol;

[Virtual]
public class ProtocolMessage {
[JsonPropertyName("seq")] public int Seq { get; set; }
[JsonPropertyName("type")] public string Type { get; }
[JsonPropertyName("type")] public string Type { get; set; } = null!;

[UsedImplicitly]
public ProtocolMessage() { }

protected ProtocolMessage(string type) {
Type = type;
Expand Down
4 changes: 3 additions & 1 deletion OpenDreamRuntime/Procs/DebugAdapter/Protocol/Request.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
using System.Text.Json;
using System.Text.Json.Serialization;
using JetBrains.Annotations;

namespace OpenDreamRuntime.Procs.DebugAdapter.Protocol;

[Virtual]
public class Request : ProtocolMessage {
[JsonPropertyName("command")] public required string Command { get; set; }

protected Request() : base("request") { }
[UsedImplicitly]
public Request() : base("request") { }

public static Request? DeserializeRequest(JsonDocument json) {
Request? request = json.Deserialize<Request>();
Expand Down

0 comments on commit 4236e96

Please sign in to comment.