Questions about configuring, using or what features are available in kamailio should be addressed to sr-users@lists.kamailio.org mailing list. This is for reporting bugs in C code and track development of new features. It helps to have a proper focus on development related tasks and the sr-users has a larger community with experienced users of Kamailio, here are mainly the developers.
Otherwise, there are functions exported by kamailio core to Kemi, not only by kemix or other modules, one is doing what you need, KSR.get_debug()