How to enable XDebug extension on my php?

php

Solution

I am answering my own question because Mountain Lion is a special case when it comes to running XDebug.

As you can see here, mountain lion comes with an older `xdebug.so` library. So the user must re-compile the library himself.

Here is how to do it.

- Download the latest version here. (We get the file under the `source` link.)

- Unpack the downloaded file with `tar -xvzf xdebug-2.2.1.tgz`

- Run `cd xdebug-2.2.1`

- Run `phpize`

- Run `./configure`

- Run `make`

- Run `sudo cp modules/xdebug.so /usr/lib/php/extensions/no-debug-non-zts-20090626`

- Restart the web server with `sudo apachectl restart`

Problem

I am running php on a macbook pro running mountain lion. Mountain lion comes with XDebug pre-installed, so based on a tutorial I've found , I made three steps. First I've uncomment this line in my php.ini : ``` zend_extension="/usr/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so" ``` Secondly I've uncomment this line in my php.ini : ``` xdebug.remote_enable=1 ``` And finally I restarted the apache server with : ``` sudo apachectl restart ``` The problem is that I see no xdebug appearing in my php details when I run a phpinfo(). Thank you. PS : The path of the above xdebug.so file is correct.

Original source