Attached is a patch to improve devel's FirePHP integration to output watchdog entries to the console of FireBug automatically, if FirePHP was available.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jurgenhaas’s picture

Re-rolled the patch to cover a scenario where a watchdog gets output before the first dfb() call.

jurgenhaas’s picture

Re-rolled tha patch for the latest dev release of Devel.

moshe weitzman’s picture

Status: Needs review » Fixed

committed, with some massaging of the message so it cleanly shows the text.

thanks. i was wondering if anyone even noticed this nice integration. if folks have not tried out firephp, its really slick.

jurgenhaas’s picture

Yes, you're right. It saves a ton of time. Thanks for taking this on. Shall we do a bit more work on this? Like grouping and exception handling. I'm happy to do that if you're interested in it.

jurgenhaas’s picture

Status: Fixed » Needs review
FileSize
637 bytes

Sorry, I reopened this issue because the message handling isn't quite clear to me. You replaced tha call to t() with a call to strtr() but the latter doesn't translate the message, does it?

Also, there was a possible issue with the variables array not being set and causing another error. Both is fixed in the applied patch. Please have a look and let me know what you think.

moshe weitzman’s picture

good work on variables fix. TRUE, but t() is only available after bootstrap_full so we need to: function_exists('t') ? t() : strtr()

sure, i'm interested in seeing enhancements for excpetions and groups (what are those?) ... i could even go for sending the $form and $form_state data structures for every $form on the page. Just listen on form_alter hook. we are now encroaching upon drupal for firebug module but that one is not actively maintained/ i think some competition here is healthy.

jurgenhaas’s picture

Quite right. I'll put the function_exist in later today, together with a proposal (or first implementation) of groups and exceptions. Groups btw. are a possibility to group fb() messages together in groups so that you get a better overview in FireBug console and only expand those entrie/groups that you're interested in.

Regarding forms, that's an excellent idea. Shouldn't be too difficult to implement. But then you probably want a link in the devel menu to toggle that feature on/off as it may cause a lot of output.

moshe weitzman’s picture

FYI, I'm open to breaking out the FirePHP code into a separate module. We can then discuss if that module should be in devel package or independant.

jurgenhaas’s picture

This patch is against the latest dev release of Devel and you can call this a complete FirePHP integration. It allows groups and all other things (get and set options, etc.) as well as outputting forms from hook_form_alter().

Regarding a splin-off I suggest we probably wait for that until we've seen what happens to FirePHP 1.0 which is in the pipeline. Then it will be called FireConsole and it may well be a completely different product. Then it may well make sense to have that separated (but still packed with devel?).

jurgenhaas’s picture

Re-rolled the patch against the latest dev-release of Devel.

moshe weitzman’s picture

If we are going to do such a complete implementation, I think we need to make this an independant module now. I also think it should be a separate project on drupal.org. If you are willing to maintain it, thats great. If not, I guess it can live in devel for a while.

Status: Needs review » Needs work

The last submitted patch, devel-firephp-watchdog-6.patch, failed testing.

willzyx’s picture

Issue summary: View changes
Status: Needs work » Closed (outdated)

Closing for lack of activity. Feel free to reopen if the issue still exists