To use the built-in debug in XAJAX library, simply add a line in your php file:
$xajax->setFlag('debug',true);
This will enable a pop-up window when the page is loaded.
Furthermore, you may also allow XAJAX write a log into a specified file.
For example,
$xajax->setLogFile("/tmp/xajax_log");