say what?

4 messages Options
Embed this post
Permalink
riorick17 () say what?
Reply Threaded More More options
Print post
Permalink
 You must be a salesman, because you have a flashy website with a lot of cool one-liners that's supposed to explain everything. Take a deep breath and relax, you've already sold me or I wouldn't have spent all that time getting this things loaded.
Object Oriented API ?
future-proof your code ?
ad-hock debugging ?
"For detailed instructions see: "
http://www.firephp.org/HQ/Learn.htm
What detailed instructions?

"Create a file at /www/Index.php and open it in your editor."
and put what in it?

require_once('FirePHPCore/FirePHP.class.php');
ob_start();

...and
$firephp = FirePHP::getInstance(true);
 
$var = array('i'=>10, 'j'=>20);
 
$firephp->log($var, 'Iterators');

???

And what do I do with this:
require_once('FirePHPCore/FirePHP.class.php');
$firephp = FirePHP::getInstance(true);
$firephp-> *
 
require_once('FirePHPCore/fb.php');
FB:: *
 
$firephp->setEnabled(false);  // or FB::
 
FB::send(/* See fb() */);

this:
require_once('FirePHPCore/fb.php');
 
fb($var)
fb($var, 'Label')
fb($var, FirePHP::*)
fb($var, 'Label', FirePHP::*)

this:
// Defaults:
$options = array('maxObjectDepth' => 10,
                 'maxArrayDepth' => 20,
                 'useNativeJsonEncode' => true,
                 'includeLineNumbers' => true);
 
$firephp->getOptions();
$firephp->setOptions($options);
FB::setOptions($options);
 
$firephp->setObjectFilter('ClassName',
                           array('MemberName'));

this:
$firephp->registerErrorHandler(
            $throwErrorExceptions=true);
$firephp->registerExceptionHandler();
$firephp->registerAssertionHandler(
            $convertAssertionErrorsToExceptions=true,
            $throwAssertionExceptions=false);
 
try {
  throw new Exception('Test Exception');
} catch(Exception $e) {
  $firephp->error($e);  // or FB::

this:
$firephp->group('Test Group');
$firephp->log('Hello World');
$firephp->groupEnd();
 
$firephp->group($'Collapsed and Colored Group',
                array('Collapsed' => true,
                      'Color' => '#FF00FF'));

this:
$firephp->log('Plain Message');     // or FB::
$firephp->info('Info Message');     // or FB::
$firephp->warn('Warn Message');     // or FB::
$firephp->error('Error Message');   // or FB::
 
$firephp->log('Message','Optional Label');
 
$firephp->fb('Message', FirePHP::*);

this:
$table   = array();
$table[] = array('Col 1 Heading','Col 2 Heading');
$table[] = array('Row 1 Col 1','Row 1 Col 2');
$table[] = array('Row 2 Col 1','Row 2 Col 2');
$table[] = array('Row 3 Col 1','Row 3 Col 2');
 
$firephp->table('Table Label', $table);  // or FB::
 
fb($table, 'Table Label', FirePHP::TABLE);

this:
$firephp->trace('Trace Label');  // or FB::
 
fb('Trace Label', FirePHP::TRACE);

and this:
$firephp->dump('Key', $variable);  // or FB::
 
$firephp->fb($variable, 'Key', FirePHP::DUMP);

??? Put them in there too? Or do I have to pick one?

I been messing with this thing for hours and so far I can't get it to do a thing. Couldn't we have one simple file just to try it out and then we have the rest of our lives to become master php debuggers right ?
Where is the output supposed to show up anyway? On the "Server" tab that says "No FirePHP data found in response headers" ???
If the "Headers" tab, "User-Agent" contains "FirePHP/0.3" does that mean I at least have it installed?
This:
http://www.firephp.org/

...is the only website I've been to where anything shows up on the Server tab, if that's even what's supposed to happen

Christoph Dorn () Re: say what?
Reply Threaded More More options
Print post
Permalink
I can see you are frustrated but may I suggest you write your questions in a more courteous tone in future. It is likely going to result in a better outcome for you. This is an open source project with free support provided on a volunteer basis.

You may have more luck with this tutorial: http://sixrevisions.com/web-development/how-to-debug-php-using-firefox-with-firephp/

Make sure you have the Firebug Net and Console panels enabled.
riorick17 () Re: say what?
Reply Threaded More More options
Print post
Permalink
 Yes I'm frustrated, I went through 300 phony google listing just to find firephp...I never would have thought to check for a firefox extension.
 An yes I have the console and net tabs enabled and I'm showing "FirePHP/0.3" in the User-Agent of the request header. So assuming I had firephp.class in the same directory this should work should it not?
   1. <?php  
   2. //include the file  
   3. require_once("firephp.class");  
   4. //create the object  
   5. $firephp = FirePHP::getInstance(true);  
   6. //send information  
   7. $firephp->fb("Hello world!");  
   8. ?>  
 And I think your website looks very nice, but maybe simple is better for an open source project. And that link you gave me is just more php programming discussion, this one is much more useful in my opinion.

http://yensdesign.com/2008/10/how-to-debug-php-code/

...ok, back to Eclipse
frankblack () Re: say what?
Reply Threaded More More options
Print post
Permalink
@riorick17: I agree that the docs here at first sight, were a bit irritating. But finally I - being a non-/hobby-programmer - got it to work. There a still a few quirks, but I don't want to miss FirePHP anymore. Christoph did a great job here!

What did you expect from FirePHP? Debugging with Eclipse is a different approach. I use various ways for debugging and FirePHP is now an important part.

Although some things were frustrating I wasn't complaining in such a rude way. Asking questions here would have been better.

Good luck with your attitude!