Tool to use for debugging code of ejabberd server?

Hii,

i am new in ejabberd.Can anybody tell which tool to use for debugging code of ejabberd server?
like any debugger available for this?

As i need t check the flow of code like how new client register with ejabberd server, how communication take place...that y i need some tool to debug.

Plese tell me, if you knw any?
Thanks in advance

> Can anybody tell which tool

> Can anybody tell which tool to use for debugging code of ejabberd server?

One simple way is to add 'printf' in the code. For example:

sum(A, B) ->
  ?INFO_MSG("Now we'll try to sum ~p and ~p", [A, B]),
  Result = A+B,
  ?INFO_MSG("And the result of A+B is: ~p", [Result]),
  Result.

> like any debugger available for this?

Erlang/OTP includes several debug tools, One graphical, one text-based, ... but I've never really used them in practice. The printf trick is a lot easier to setup for me :)

> As i need t check the flow of code like how new client register with ejabberd server,

You can also increase the loglevel option in ejabberd.cfg

> how communication take place...

To see network traffic you can use tools like tcpflow or Wireshark. Remember to disable encryption in ejabberd and the clients. Example usage for C2S if you have ejabberd running in your own machine:

sudo tcpflow -ec -i lo tcp port 5222
Syndicate content