adam-dot-cohen / HyperSerializer

Dot Net Binary Serializer - 17x faster than Protobuf and Messagepack, 2x faster than MemoryPack
Apache License 2.0
64 stars 5 forks source link

Dump Mode - for Debugging #7

Closed najak3d closed 9 months ago

najak3d commented 9 months ago

Would be nice to be able to set compiler directive, which supplements the binary serialization with a Debug Dump to file, giving the details of what was serialized (in readable text form). So if/when things go wrong, we can see what was "Written/Read" to/from the binary stream. This debug dump would tell you member names, types, byte-size, and values. Something like:

Name[11]: "Adam Cohen" Age[4]: 869 Birthdate[8]: Dec 25th, 1154 Velocity3D[12]: X[4]: 1.432 Y[4]: 0 Z[4]: -3912.43

Something like that.. Would save us tons of time, when it comes to debugging when things go wrong.

adam-dot-cohen commented 9 months ago

Support added set HyperSerializerSettings.WriteProxyToConsoleOutput = true before calling the serializer to write the output to the console.