wisp-forest / gadget

Debugger's Delight
https://modrinth.com/mod/gadget
GNU Lesser General Public License v3.0
44 stars 6 forks source link

Record PacketByteBuf method calls to detect serialization/deserialization mismatches #32

Closed BasiqueEvangelist closed 2 months ago

BasiqueEvangelist commented 1 year ago

Serialize/deserialize mismatches in manually written networking code are really hard to debug, especially if the serializer and the deserializer are in different methods. Some of us can even attest to having to debug such errors, especially in very long packets.

If gadget records when certain PacketByteBuf methods were called, however, this would mean that all relevant read methods on the PacketByteBuf could explode immediately if there is a mismatch in packet formats, which would making debugging these issues much easier. Additionally, this would add the ability to make a nice view for packets that don't have custom deserializers and unwrappers on gadget's side.

BasiqueEvangelist commented 2 months ago

not very useful with PacketCodecs tbh