News Feed
Jobs Feed
Sections




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

NetTuts.com:
Xdebug - Professional PHP Debugging
August 29, 2013 @ 09:56:01

On NetTuts.com there's a new article introducing Xdebug, a powerful tool that can help you with debugging your PHP applications. It works by investigating what's happening "on the inside" and reporting it back to your debugger.

Well, technically, Xdebug is an extension for PHP to make your life easier while debugging your code. [...] But just imagine for a moment, as your applications evolve, you might get into the habit of sprinkling your code all over with little echos, var_dumps and custom debuggers. [...] The next question is: how do you debug in production? [...] Now lastly, have you ever wished to be able to step through your code, line by line, watch expressions, and even step into a function call to see why it's producing the wrong return value? Well, you should definitely dig into the world of professional debugging with Xdebug, as it can solve all of the problems above.

They walk you through the setup of a complete (MAMP-based) environment on an OSX installation. You'll also need Xcode and the command line tools to be able to compile Xdebug. They recommend installing Homebrew to make installing the needed tools easier. They use Homebrew to install the PHP 5.4 version of Xdebug which then compiles and outputs a shared module you can put in your PHP extensions directory.

On the other side of things, the article also helps you set up your IDE, in this case PHPStorm but it would work for lots of others - to accept the debug messages from the server. He includes a sample script with some calls to the Xdebug-enabled debugging functions and what kind of responses (with screenshots) you should see in your IDE.

0 comments voice your opinion now!
xdebug debugging extension homebrew mamp osx install tutorial

Link: http://net.tutsplus.com/tutorials/tools-and-tips/xdebug-professional-php-debugging/

blog comments powered by Disqus

Similar Posts

Sephiroth.it: Debugging PHP with XDebug

Nick Belhomme's Blog: PHP 5.3.3 Namespaces

Developer.com: Creating Complex, Secure Web Forms with PHP and HTML_QuickForm2

Christopher Jones' Blog: PHP OCI8 Extension 1.2.4 is in PECL

Matthew Weier O'Phinney's Blog: Creating Re-Usable Zend_Application Resource Plugins


Community Events











Don't see your event here?
Let us know!


security opinion component package hhvm install performance symfony2 application framework introduction series podcast hack unittest composer database language facebook release

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework