How to debug in Drupal using drupal_set_message and come to the exact line that is causing the error?
Submitted by sudeepg on Sun, 12/14/2008 - 12:15.
Put the following code snippet in includes/bootstrap.inc in the drupal_set_message function.. .
<code>
if ($type == 'error') {
$message .= '<pre>'. print_r(debug_backtrace(), 1) .'</pre>';
}
</code>
- sudeepg's blog
- login or register to post comments