HomeBrew is a package manage for OS X that helps you to easily install commonly used packages. HomeBrew can be used to install and upgrade your version of PHP, and can also be used to easily install Xdebug:
Where <version number> is the version number (without the .) that you are using. For example, for PHP 5.6 use:
This will install and enable Xdebug in your php.ini file. You can check that Xdebug has been install by using the command
You should see a line similar to
Downloading, Installing and Configuring the Xdebug Extension
- Download the Xdebug extension compatible with your PHP version (mind the PHP version number and thread-safe/non-thread-safe option) from the official site. These instructions are based on the latest version in the 2.x release of Xdebug.
- Copy the extension file to your web server in a location that is accessible by the web server.
- Add the following lines at the end of your php.ini file: http://xdebug.org/docs/remote For additional information check
- Restart your web server
- Check your installation:
- Execute in the terminal
- Or create a file with the following content:
- Open a page corresponds to this file and check phpinfo() output. It should contain Xdebug section: