Debugging Cap'n Proto RPC

53 views
Skip to first unread message

Samuel Ainsworth

unread,
Apr 29, 2020, 5:59:09 PM4/29/20
to Cap'n Proto
How do people tend to debug/play with Cap'n Proto RPC servers? Is there anything like Postman for capnproto?

Kenton Varda

unread,
Apr 30, 2020, 3:14:12 PM4/30/20
to Samuel Ainsworth, Cap'n Proto
Hi Samuel,

Unfortunately, there isn't a lot of tooling available for Cap'n Proto. I tend to debug by adding KJ_DBG() statements to my code (basically a fancy printf()). Cap'n Proto messages are stringified nicely by KJ_DBG() and related macros.

The `capnp` tool also has the ability to convert encoded messages into text and vice versa (see `capnp --help`), but that's more for serialization. I'd love to extend the `capnp` tool with a mode where it connects to an RPC server and lets you type in calls dynamically, or maybe a mode where it acts as a proxy and logs all the calls it sees going back and forth... so much to build, so little time. :)

-Kenton

On Wed, Apr 29, 2020 at 4:59 PM Samuel Ainsworth <skain...@gmail.com> wrote:
How do people tend to debug/play with Cap'n Proto RPC servers? Is there anything like Postman for capnproto?

--
You received this message because you are subscribed to the Google Groups "Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email to capnproto+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/capnproto/a64d9a98-a91f-4c48-9667-0e385575b0e9%40googlegroups.com.

Samuel Ainsworth

unread,
Apr 30, 2020, 5:41:48 PM4/30/20
to Kenton Varda, Cap'n Proto
I hear ya! :) I’m using capnproto via the rust language bindings, so figuring out KJ_DBG() may be more trouble than its worth for me. I’ll push forward!

Thanks,
Samuel 

You received this message because you are subscribed to a topic in the Google Groups "Cap'n Proto" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/capnproto/OeuEA64rK8s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to capnproto+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/capnproto/CAJouXQkOfJWE1eELewhRUmUBPnXXEHMR%3D4O9iNmM_%2BEgEOE8Qw%40mail.gmail.com.

Reply all
Reply to author
Forward
0 new messages