Come to the 2010 CMS Expo

xdebug

Installing XDebug 2 on Mac OS 10.6 Snow Leopard (with PHP 5.3)

A while back, I wrote an extensive article on installing XDebug on OS X with MAMP. Now that I have Snow Leopard, I am making a new attempt at working with XDebug on OS X. This article discusses working with XDebug 2.0 or greater on Mac OS 10.6 with PHP 5.3, as packaged with OS X. Continue on for step-by-step instructions. (For more notes on upgrading a PHP dev environment for Snow Leopard, read this article.)

PHP Developer's Snow Leopard Upgrade Notes

I'm upgrading to Snow Leopard, and I intend to switch from MAMP to the built-in PHP/Apache 2 configuration. As a PHP developer, there are several notable things that I wanted to track as I performed my upgrades. This article tracks those changes

PHP 5.3PHP 5.3
My current OS 10.5 toolchain for PHP was this:

  • PHP 5.2.6 (MAMP)
  • Apache 2 (MAMP)
  • MySQL 5 (MAMP)
  • TextMate
  • Git
  • XDebug
  • Several PEAR packages installed into MAMP's PHP 5, including PHPUnit, PhpDocumentor, Phing, and XDebug

One of the desired outcomes was to switch to the OS X version of PHP and Apache, which is tenable now that PHP is more robust (and now that I know how to use PEAR with the OS X version). It's also desirable because Snow Leopard is now running PHP 5.3. Here are my notes on the upgrade.

Update: Problems with PHPUnit and Phing.

Debugging your PHP Code: XDebug on MAMP with TextMate and MacGDBp Support

As I see it, there are two major drawbacks to the otherwise-spectacular MAMP (MacOS Apache MySQL, PHP) package (three if you count the funky directory structuring):

  1. The .h files are all missing, so PECL doesn't work very well.
  2. There is no debugger.

The first issue is covered elsewhere. In this article, I will address the second by explaining how to setup XDebug on MAMP. XDebug is one of the two popular PHP debugging engines (With ZendDB being the other).

In this article we will cover the following:

  • Getting and installing XDebug
  • Using XDebug for basic stack tracing
  • Integrating XDebug with TextMate
  • Configuring XDebug and MacGDBp for client/server debugging
  • Using MacGDBp
Syndicate content

Recent comments