开发者

Is there a Visual Studio debug visualizer for a stream or byte array containing protobuf payload?

Does anybody k开发者_如何学Gonows of a VS debug visualizer for the protobuf content?


I for one don't, although one exists for wireshark if that helps.

I haven't had time to look at the VS extension API necessary; also note that unless you have the schema (either as .proto, or via a type-model) the format is internally ambiguous - a varint could be twos-complement or zig-zag encoded for example (with no distinction on the wire), or a fixed32 could be an int, a float, etc. A string could be a UTF-8 string, a packed array, or a sub-message. And so on.

If anyone wanted to implement this, the ProtoReader available already exposes the necessary API to handle the core encoding - it is simply that interpreting that encoding really needs access to the schema. Plus, VS visualizer skills!

Might I suggest that (unless you expect the raw data itself is corrupt) a simpler option is to deserialize into an object, and view the object in the debugger.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜