I added a trace for the invoked call, showing the call ID, remote method name, and serialized arguments, followed by the server response. I also added a broken call to illustrate logs of a server side error.
In order to enable the debugging, all you have to do is to add debug: true to the ajaxConfig object. If this key is not present, the debugging classes won't even be included, to save on loading time and performance.
Let me know what you think.