How to debug Drupal :: debug_backtrace()
By liviu - Posted on November 8th, 2010
Tagged:
Sometimes debuging Drupal can get confusing. I blame the lack of oop (we want you so bad Drupal 7) , the lack of mvc, and some kind of evil gnomes plans to take over the world (but more on this latter).
So in case you're going crazy trying to figure out what goes wrong in some otherwise great Dru[pal module, here's little function i got from an interesting article on lulabot about debugging Drupal:
function drupal_set_message($message = NULL, $type = 'status')
{
// DEBUG: Go track down that stinkin' error...
if ($type == 'error')
{
$message .= '<pre>'. print_r(debug_backtrace(), 1) .'</pre>';
}
if ($message) {
...
Bookmark/Search this post with:
- liviu's blog
- Login or register to post comments
Delicious
Digg
StumbleUpon
Propeller
Reddit
Magnoliacom
Newsvine
Furl
Facebook
Google
Yahoo
Technorati
Icerocket