Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Sameer Borate:
Debugging Laravel with MonoLog and FirePHP
Jun 07, 2013 @ 14:08:37

Sameer Borate has a new post to his site showing you how to debug a Laravel application with Monolog and FirePHP.

By default, Laravel is configured to create daily log files for your application, and are stored in app/storage/logs. All Laravel logging features are handled by the wonderful MonoLog library. Monolog includes various log handlers you can use – FirePHP, ChromePHP, CouchDB, Stream and many more. One of my favorites is FirePHP while debugging PHP apps.

Getting Monolog to write out to FirePHP is pretty easy and he includes the sample code to make it happen - basically pushing a "FirePHPHandler" into the Monolog instance and using it from there.

tagged: debug laravel monolog firephp handler tutorial

Link: http://www.codediesel.com/laravel/debuggin-laravel-with-monolog-and-firephp

PHPMaster.com:
Debugging PHP Code with FirePHP
Oct 30, 2012 @ 13:36:21

On PHPMaster.com today there's a new tutorial showing you a different method for debugging your code than the usual print_r or var_dump - using FirePHP, a tool that uses messaging to relay information back to your browser.

As the technical manager of a suite of software projects, one of my duties is doing code reviews. One of the things I see far more often than I’d like when doing reviews is debugging PHP code committed and pushed up the chain. [...] The safest method of debugging requires configuring your IDE to use a tool like Xdebug or Zend Debugger to trace currently executing code. This isn’t always practical. In the absence of using a fully configured debug environment, I turn to FirePHP.

He shows how to set up and configure FirePHP to work with your debugging and some suggestions on browser extensions you can install to view the messages. Sample code is included showing you how to use the tool to send messages back to the browser including grouping messages, building tables and something that shows a conditional caching report message.

tagged: debug tutorial firephp client message

Link:

XPertDeveloper.com:
PHP Debugging Tools
Sep 16, 2011 @ 13:49:22

On the XPertDeveloper.com blog today there's a new post sharing four handy debugging tools you can use to make finding those elusive problems in your code simpler.

PHP is very well used scripting language in now a days. But PHP does not have any inbuilt debugging tools or extension. But we have some extensions and tools available which serves the debugging purpose of the PHP.

The tools on their list involve both the backend and frontend:

tagged: deugging tools xdebug firephp zenddebugger phpconsole

Link:

Henry Hayes' Blog:
Firebug Console.Log for PHP using Zend Framework
Jun 15, 2011 @ 17:49:27

Henry Hayes has written up a handy post to his blog looking at using FirePHP and Zend_Log_Writer_Firebug to log messages directly to your Firefox's Firebug console.

Due to sloppy programming in the past many PHP error logs can become very clogged up and, unless you use some fancy grep technique, unusable. [...] A project has been around for some time now called FirePHP. This enables us to log messages of various levels of severity to the Firebug console! - Awesome. Just imagine if you are developing an ajax app, you could have all your debug messaging in one place.

He walks you through the steps needed to get the logging up and running - setting up FireBug (if you don't have it already) and FirePHP, editing your Zend Framework bootstrap file to add an _initLogging() method and using it for logging, both in the backend script and on the frontend in the console. He also includes a quick update to the logging method that only logs to the Firebug console if the environment is not production.

tagged: firebug consolelog firephp zendframework logging writer

Link:

Slawek Lukasiewicz's Blog:
Zend Framework: logging with Firebug and FirePHP
May 24, 2011 @ 14:44:46

Slawek Lukasiewicz has a new post to his blog today showing you how to use the popular Firebug extension for Firefox with the FirePHP plugin to make error logging simpler and less obtrusive without ever having to leave the browser.

If you use Firefox, I bet you already know Firebug extension. This is irreplaceable tool for web development. But there is also FirePHP extension, which provides possibility to log into Firebug console from PHP scripts. This is very convenient way for debugging process, because logs are independent from application output.

He shows the integration you can do with the Zend Framework's Zend_Log component to write basic messages and the Zend_Wildfire component to write tabular data back to your browser's console with two snippets of code.

tagged: logging firebug firephp tutorial zendframework zendlog zendwildfire

Link:

Christoph Dorn's Blog:
Zend Server + FirePHP on AWS
Jan 06, 2011 @ 15:43:01

Christoph Dorn has a new post today showing how to get the FirePHP tool to work together with Zend Server on an AWS instance to help make your debugging even simpler.

FirePHP can nicely complement the built-in tools available when using Zend Server and can be easily made available to all provisioned sites. This tutorial illustrates how to setup FirePHP 1.0 for all virtual hosts on a Zend Server AMI on Amazon EC2.

He steps you through the process of getting FirePHP installed and working in your browser as well as pulling the "firephp.phar" file in on the Zend Server side. Configuration is pretty simple - the lines for the Apache config are included and the JSON needed to make the credentials for FirePHP are too. A simple test script is created and an auth key is set and you should be up and running.

tagged: firephp tutorial zendserver aws amazon apache debug

Link:

Christoph Dorn's Blog:
FirePHP on Magenting
Dec 17, 2010 @ 16:08:47

Christoph Dorn has a new post to his blog today about using the FirePHP extension for Firefox/FireBug to help debug applications running on the Magenting service.

FirePHP can be useful when debugging remote PHP applications on shared or dedicated servers. This tutorial illustrates how to setup FirePHP 1.0 on Magenting which is a managed Magento hosting service. Go to http://magenting.com/ and create an account. This tutorial was prepared by using a Spark account, but it should work just the same with all plans.

He walks you through all the steps you'll need - getting the FirePHP extension installed, getting the PHP libraries set up on the remote server and configuring it to work with your application. A snippet of code is included that can be used to test the connection.

tagged: firephp debug tool firefox firebug tutorial magenting magento

Link:

Christoph Dorn's Blog:
FirePHP 1.0 in 5 Steps
Nov 30, 2010 @ 14:23:59

Christoph Dorn, author of the FirePHP tool for interfacing your PHP applications directly with Firebug, has written up a guide to help you get started using the latest version in five easy steps.

Get started with FirePHP 1.0 in 5 steps. Why upgrade? Check out the new features.

The steps are simple (it's a pretty easy tool to use):

  • Install the FirePHP Companion
  • Install FirePHP
  • Use the sample code to include in an application
  • Authorize the client
  • Log a test message (code snippet included)

You can find out more about the FirePHP project on the project's site.

tagged: firephp extension firebug debug version

Link:

PHPBuilder.com:
Four Sane Solutions for PHP Debugging
Nov 05, 2010 @ 13:41:28

On PHPBuilder.com today there's a new article from Jason Gilmore sharing what he calls "four sane solutions" to help you debug your PHP applications better than just an echo or var_dump.

Few tasks are more tedious and frustrating than debugging a Web application. [...] Fortunately, PHP developers have a number of powerful debugging solutions at their disposal. Whether you're merely inspecting array contents or attempting to determine the status of an Ajax-driven POST response, these four solutions are guaranteed to have an immediate impact on your productivity.

His four solutions involve changing the error reporting level on your development environment higher than production to catch issues that might slip through unnoticed, using XDebug, integrating FirePHP and using test-driven development to be sure things work from the outset.

tagged: soluton debugging errorreporting xdebug firephp tdd

Link:

Christoph Dorn's Blog:
TIP: FirePHP data volume filtering
Oct 18, 2010 @ 14:57:58

Christoph Dorn has posted a tip for those using the FirePHP tool in their debugging - a way limit the output results (like only part of a huge array of database results).

Array and object values may contain a lot more data as FirePHP traverses them (all array elements and object members) until the complete or maximum depth is reached. This is also true when logging exceptions and traces where all function and method arguments are also traversed. The data volume can quickly grow to megabytes which has fatal consequences for transmission of the debug data to the client and the client being able to render it.

The FirePHPPCore API gives you a way to set this maximum depth level bu setting either a "maxArrayDepth" or "maxObjectDepth" on the FirePHP object before sending it out to the logger. There's also a handy feature that, instead of limiting the depth, can filter out just the elements you're interested in. Code snippets for this and a Zend_Log_Writer_Firebug example are all included.

tagged: firephp debug filter volume array object zendwriter

Link:


Trending Topics: