O'Reilly logo

Drupal 6 Theming Cookbook by Karthik Kumar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Diagnostic logging of JavaScript using Firebug

Even though Firebug supports an endless number of more complex JavaScript debugging features, the fundamental approach of using diagnostic prints to debug scripts is still alive and well. In this recipe, we will be looking at Firebug's console() function and a few of its variants.

Getting ready

It is assumed that the Firebug add-on has been successfully installed in Firefox. We will also be using the myzen theme created earlier in this book as an example theme in this recipe.

How to do it...

Firebug comes with a console to log output which is accessed using the console command. To see this in action,

  1. Navigate to the myzen theme folder at sites/all/themes/myzen.
  2. Browse to the js subfolder where the JavaScript ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required