xdebug

16 Mar

Analyzing Xdebug Trace Files: Tools we use to parse and examine Xdebug trace files

in drupal, php, xdebug

During DrupalCon Chicago 2011, I mentioned that we collect Xdebug trace files and analyze them to identify performance bottlenecks and other issues in our PHP code. Some of the Xdebug tracing tools we wrote in-house. As promised, we have now released two of our Xdebug tracing tool suites: ValaXdebugTools and XdebugUtils.

Read on for a description of each of these two tools.

07 Sep

Configuring MacGDBp for Debugging a Local Debian Virtual Machine

in Debian, drupal, mac, macgdbp, os x, virtualbox, xdebug

In my current Drupal development environment, I run an entire Debian server stack (LAMP + Memcache + Varnish, etc) inside of a VirtualBox virtual machine. On those frustration-laden occasions when I need to fire up the debugger, I use MacGDBp to connect to the virtual machine. Here's how I configure them. (If you just want to configure MacGDBp for debugging with MAMP or OS X's Apache, you may want to read an earlier article, and then check out the updates for Snow Leopard.

22 Nov

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

in os x, php, snow leopard, xdebug

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.)

21 Nov

PHP Developer's Snow Leopard Upgrade Notes

in git, os x, phing, php, phpdocumentor, programming, snow leopard, xdebug

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.

16 Mar

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

in macgdbp, pecl, php, querypath, textmate, xdebug

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