I installed both the Firefox Extension and the Drupal Module. Then I granted permissions to everyone AND logged in as admin. Finally I doubled checked (custom Theme) and I have the $closure at the end. None the less it isn't working and I get the following message:

There were no messages sent to the general log. Please use "firep($item, $optional_title)" to output messages to this console.

Where do I put that code? What am I not understanding here?
Thanx

Comments

populist’s picture

Status: Active » Closed (fixed)

The general log will provide debugging information in the Firebug window if you specify, in the code, a specific debugging call. You need to use firep() in the code to have its output show up there. I think the best way to think about firep() is to think about it as a print_r($item) that shows up in the Firebug window.

talatnat’s picture

I'm getting the same error in the General tab.Where exactly does one put the debugging call -- in the PHP code one is developing, the drupal-for-firebug module, one of the *.tpl.php files? And is this the debugging call -- firep($item, $optional_title)? Tks, sorry for the noob question...

talatnat’s picture

Status: Closed (fixed) » Active
populist’s picture

Status: Active » Closed (fixed)

no problem on the question, its one thats helpful and i think we can expand the documentation to give more information.

firep() is a global function that can be put in either the theme layer or module files to take a PHP object (string, array, object, etc) and output it to the firebug window. it works similarly to the dpr() function in devel module or print/print_r in PHP.

jstreifel’s picture

Sorry if I am missing something, but I still do not understand where exactly to put this code...?

slipsey1’s picture

Please explain exactly where to put this function.
Please tell what file to open and where to put it in the file.
Thanks

leovw’s picture

I am getting the same thing and am struggling to get Drupal For Firebug working... Any ideas how this would be implemented?

There were no messages sent to the general log. Please use "firep($item, $optional_title)" to output messages to this console.

Peter Swietoslawski’s picture

I've had the same problem with firep() not printing anything into Drupal->General console. But that was my fault as I've placed firep() in a wrong place - inside page.tpl.php. I've peaked under the hood of Drupal for Firebug module and it is rendering all its content in hook_footer.
So to get valid output from firep() into Drupal->General console the last place in code execution path you can put firep() it is template.php file.
In the other words you can place firep() anywhere in your modules code (or other modules you debug) with the exception of template files.

If you want to debug template files you need to use FirePHP library with FF add-on. Just do following:

  • Install FF add-on http://www.firephp.org/
  • Download FirePHP library http://www.firephp.org/DownloadRelease/FirePHPLibrary-FirePHPCore-0.3.1
  • Place it in your PHP's include path. If not sure where PHP is searching for files run from command line:
    • php -i | grep include_path
    • or run phpinfo() function and search for include_path
    • or just edit your php.ini file and search for the same :)
  • Once FirePHP files are in PHP's accessible path you can start using FirePHP by including its library into your code with: require_once('FirePHPCore/FirePHP.class.php');
  • Then initialize FirePHP with: $fp = FirePHP::getInstance(true);
  • And you can output to console any message with: $fp->log($debugged_variable, 'Optional Label');

Note:
FirePHP will log messages under Firebug Console tab.

For more advanced usage check http://www.firephp.org/HQ/Use.htm

PMorris’s picture

The confusion here for me was I didn't know what a php module was or that firephp was a module I had to download. More advanced programmers would know that I guess. It takes some serious permission to install firephp which I don't have on my shared host.

proxiss’s picture

I've tried to use firep in my phptemplate_preprocess_page function inside the template.php. That doesn't work out either.
Now I am using it only in my modules code, anything I want to debug while rendering is done by dprint_r().
Cheers, Rainer

eltioseba’s picture

Sorry, my mistake.