'Cause it's nearly impossible to var_dump
or dump
into an Ajax Dialog or an Ajax Command, the most easier way is to write into the Apache logs.
To do this, just add the following snippet in your code:
error_log(var_export($var), TRUE);
Then I watch my Apache logs
tail -f /usr/local/var/log/httpd/error_log