best drupal debug

drupal_set_message is not suitable for debugging when there is need to debug vars before the actually page action happen, thus not rendered in HTML. The most convinient way is to use:


error_log(var_export($var_to_debug, TRUE));

Then just look into the error log:


tail -f error_log

May 29, 2018