Introducing FirePHP Companion
August 20, 2010

When I originally wrote FirePHP in 2007 I had big ambitions as to the features I was going to incorporate. I learned quickly that the kinds of things I wanted to do were not going to be easy to implement in a maintainable way using existing code I had and open source code I could find. What I needed was a wholistic approach to the problem area of server-side application intelligence and a set of libraries based on standards that could be applied cross language.

After countless hours of research and development I am pleased to announce the first fruit of my labor.

FirePHP Companion is an alternative client for FirePHP that goes well beyond simple console logging and provides many features integral to an efficient development and debugging workflow.

I think this time around I am much closer to hitting the mark I was after to begin with and I hope you will judge my approach for yourself. FirePHP Companion is a commercial tool ($99 USD when released) with a free LITE version intended to replace the existing FirePHP Firefox Extension. Both editions use the same server library (FirePHP 1.0) and while the free version will focus on logging from server-side code to Firebug, the paid version will focus on providing a complete end-to-end development and debugging solution that seamlessly integrates with your existing applications.

Getting Started

Requirements:

NOTE: The FirePHP 1.0 release will make it onto www.firephp.org later this year.

Let’s assume you are using the phar archive and you have the hostname http://demo.localhost/ mapped to a directory containing an index.php file and the phar archive.

define('INSIGHT_IPS', '*');
define('INSIGHT_AUTHKEYS', '');
define('INSIGHT_PATHS', __DIR__);
define('INSIGHT_SERVER_PATH', '/index.php');
require_once('phar://'.__DIR__.'/firephp.phar/FirePHP/Init.php');

When you integrate FirePHP into your application the code above should be place at the top of your bootstrap file to enable FirePHP for your entire application.

Once included you can start logging to FirePHP Companion:

$inspector = FirePHP::to('request');
$console = $inspector->console('Debug');
$console->log('Hello World');

This works by first selecting the request context and obtaining a named console called Debug and then logging to it. In FirePHP Companion this will be displayed as follows:

To see the messages you have logged follow these steps:

  1. Using Firefox browse to http://demo.localhost/
  2. Open Firebug and enable the Net panel
  3. Refresh the page for the request to show up in the Net panel and expand it
  4. Select the Insight tab
  5. Set the INSIGHT_AUTHKEYS constant in index.php to the authorization key displayed
  6. Refresh the page, expand the request in the Net panel and select the Insight tab again
  7. Click Inspect with Companion which will load the Companion Window

Congratulations! You have logged your first message.

FirePHP Companion includes a comprehensive Reference that holds relevant documentation for all FirePHP features. To access the documentation launch the Companion Window (double-click in the Firefox status bar) and click on the Reference button in the footer. Once loaded click on the Tools section on the left.

You can also access the Reference here: http://reference.developercompanion.com/

What’s Next

I am hoping this is all the information you need to get started with FirePHP Companion. It’s a feature-packed tool that will only get better and I hope you will follow it’s progress. I will be posting a lot more information, tutorials and screencasts so subscribe to my blog or follow me on twitter.

7 Comments
euroman
August 23, 2010

I don’t quite understand this new tool, but I use FirePHP every day at work and it is awesome.

August 23, 2010

@euroman FirePHP Companion is a more feature-rich client that is intended to be used instead of the current FirePHP Firefox Extension. It uses the new FirePHP 1.0 server library that adds a bunch of features and will be made available more generally later this year. Hope that helps.

Thomas
August 24, 2010

Firebug is awesome, I’m using it every day! But there is a disadvantage: Only Firefox is supported and Chrome is not. Are there any plans of bringing a Chrome extension? Would be awesome¬≤ !
Keep on this great work!

PowderFan
August 24, 2010

FirePHP like it is now is great…But this new Tool has incredible potentials.
Creating Tabs for like every error category…

Great work Mr. Dorn I can’t wait to see the final version.

wakes
August 24, 2010

Hi, this looks really good, however while documentation is really sparse, can you please supply a link to download the screencast or maybe seed it into bittorrent then I can hit rewind as many times as I want as my head gets around it…

Cheers,
Steve

August 24, 2010

@Thomas: Yes, there are plans for a Google Chrome extension. Some work in that direction is already underway https://bugs.webkit.org/show_bug.cgi?id=30897 & http://github.com/sthulbourn/WebKit-Wildfire but there is a lot still left to do.

@PowderFan: There will not be a final version :) It is going to be constantly evolving.

@wakes: You can download the screencast here http://media.developercompanion.com/screencasts/2010-07-20-FirePHPCompanionPreview_1024x768_512.mp4 The screencast shows you the ‘best practices’ way of integrating FirePHP while the instructions above show the minimal install method. You can find detailed documentation at http://reference.developercompanion.com/#/Tools/FirePHPCompanion/Introduction/ and I will be posting more tutorials here on my blog.

September 2, 2010

Cool, FirePHP is amazing for any server-side language including ASP.net MVC
And now, I waiting for news about FirePHP Companion and how it’s can be useful to me.

Thanks for FirePHP.





Linkbacks