After the fairly painless process of installing MAMP on my Mac running Mavericks, I had to Frankenstein the directions from about 5 different posts to get Xdebug up and running. Seems like it would be a good idea to document this process and hopefully others can find it and maybe it will bering some clarity to the process.

All of this, of course, should be run from Terminal. I switched to my Downloads directory before downloading and installing autoconfig, however, you can download it to whatever directory you want. You'll probably want to delete the autoconf-latest.tar.gz (and the folder it creates) when you are done, either manually or through Terminal. I'll leave that part up to you.


Step 1: Install autoconfig:

This first bit of code should execute all of the commands below in order. If there are any issues with this command or if you prefer to enter the commands line by line, each command is listed individually below.

Code: Select all
curl -OL http://ftpmirror.gnu.org/autoconf/autoconf-latest.tar.gz && tar xzf autoconf-latest.tar.gz && cd autoconf-* && ./configure --prefix=/usr/local && make && sudo make install

Alternatively, you could enter each command on its own line and wait for each to complete.

Code: Select all
curl -OL http://ftpmirror.gnu.org/autoconf/autoconf-latest.tar.gz
Code: Select all
tar xzf autoconf-latest.tar.gz
Code: Select all
cd autoconf-*
Code: Select all
./configure --prefix=/usr/local
Code: Select all
make
Code: Select all
sudo make install


Step 2: Install PEAR:

The PEAR installers are already included with Mavericks but are not installed by default. Just use the following commands to run the installer.

Again, the all-in-one code is here:

Code: Select all
cd /usr/lib/php && sudo php install-pear-nozlib.phar

And the individual commands are here:

Code: Select all
cd /usr/lib/php
Code: Select all
sudo php install-pear-nozlib.phar


Step 3: Install command line dev tools:

The XCode command line tools do not require XCode to run. If you would like to download the full XCode package, you can get it here: https://developer.apple.com/xcode/

Code: Select all
xcode-select --install


Step 4: Install Xdebug

Code: Select all
sudo pecl install xdebug