I want to install a debugger for PHP for my MAMP environment on Mac OS 10.8.5, where I run PHP 5.5.3. I am looking at PHPStorm and Xdebug. I am doing my best to follow the instructions on the PHPStorm site.
Here are my steps:
1) Download the Xdebug extension compatible with your PHP version
$ su admin
$ cd /Applications/MAMP/bin/php/
$ git clone git://github.com/xdebug/xdebug.git
I understand that this installs Xdebug 2.3.2 (Release date: 2015-03-22)
2) Copy the extension file to your web server in a location that is accessible by the web server. I do not understand what this extension file
is, so I have been unable to complete this step.
3) Add the following lines at the end of your php.ini file:
[Xdebug]
zend_extension="/Applications/MAMP/bin/php/xdebug/php_xdebug.h"
xdebug.remote_enable=1
xdebug.remote_host="localhost"
xdebug.remote_port="9000"
xdebug.profiler_enable=1
xdebug.profiler_output_dir="/Applications/MAMP/tmp"
Note the additional final line, suggested by this page.
4) Restart your web server
5) Check your installation
$ php --version
PHP 5.3.28 (cli) (built: Jan 23 2014 18:02:48)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies
Not the right version of PHP. Trying again:
$ /Applications/MAMP/bin/php/php5.5.3/bin/php --version
PHP 5.5.3 (cli) (built: Sep 18 2013 14:31:13)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
There is no sign of "With Xdebug..."
What exactly should I do at step 2? Have I made a mistake at any of the other steps? Are there further steps that I am missing?