Install Xdebug for PHP 5.6 on OSX with Homebrew : <p>The homebrew/php tap was <a href="https://github.com/Homebrew/homebrew-php/issues/4721" rel="noreferrer">recently deprecated</a>. This deprecation included versioned formulae for php installations (e.g., <code>php56</code>) as well as installation of individual extensions (e.g., <code>php56-xdebug</code>).</p>

<p>Installing PHP 5.6 with Homebrew now requires the command: <code>brew install php@5.6</code>.</p>

<p>Installing PHP 5.6 and then running <code>phpinfo()</code> indicates that Xdebug is not loaded in the list of extensions, and a debugger extension is not found. A selective copy of the output is as follows:</p>

<pre><code>$ /usr/local/Cellar/php\@5.6/5.6.35/bin/php -r "phpinfo();"

PHP Version =&gt; 5.6.35

System =&gt; Darwin [my hostname] 17.4.0 Darwin Kernel Version 17.4.0: Sun Dec 17 09:19:54 PST 2017; root:xnu-4570.41.2~1/RELEASE_X86_64 x86_64
Build Date =&gt; Mar 31 2018 20:19:57
Configure Command =&gt;  './configure'  '--prefix=/usr/local/Cellar/php@5.6/5.6.35' '--localstatedir=/usr/local/var' '--sysconfdir=/usr/local/etc/php/5.6' '--with-config-file-path=/usr/local/etc/php/5.6' '--with-config-file-scan-dir=/usr/local/etc/php/5.6/conf.d' '--enable-bcmath' '--enable-calendar' '--enable-dba' '--enable-exif' '--enable-ftp' '--enable-fpm' '--enable-intl' '--enable-mbregex' '--enable-mbstring' '--enable-mysqlnd' '--enable-opcache-file' '--enable-pcntl' '--enable-phpdbg' '--enable-phpdbg-webhelper' '--enable-shmop' '--enable-soap' '--enable-sockets' '--enable-sysvmsg' '--enable-sysvsem' '--enable-sysvshm' '--enable-wddx' '--enable-zip' '--with-apxs2=/usr/local/opt/httpd/bin/apxs' '--with-bz2' '--with-fpm-user=_www' '--with-fpm-group=_www' '--with-freetype-dir=/usr/local/opt/freetype' '--with-gd' '--with-gettext=/usr/local/opt/gettext' '--with-gmp=/usr/local/opt/gmp' '--with-icu-dir=/usr/local/opt/icu4c' '--with-jpeg-dir=/usr/local/opt/jpeg' '--with-kerberos' '--with-layout=GNU' '--with-ldap' '--with-ldap-sasl' '--with-libedit' '--with-libzip' '--with-mhash' '--with-mysql-sock=/tmp/mysql.sock' '--with-mysqli=mysqlnd' '--with-mysql=mysqlnd' '--with-mcrypt=/usr/local/opt/mcrypt' '--with-ndbm' '--with-openssl=/usr/local/opt/openssl' '--with-pdo-dblib=/usr/local/opt/freetds' '--with-pdo-mysql=mysqlnd' '--with-pdo-odbc=unixODBC,/usr/local/opt/unixodbc' '--with-pdo-pgsql=/usr/local/opt/libpq' '--with-pgsql=/usr/local/opt/libpq' '--with-pic' '--with-png-dir=/usr/local/opt/libpng' '--with-pspell=/usr/local/opt/aspell' '--with-unixODBC=/usr/local/opt/unixodbc' '--with-webp-dir=/usr/local/opt/webp' '--with-xmlrpc' '--with-xsl' '--with-zlib' '--with-curl' 'CC=clang' 'CPPFLAGS=-DU_USING_ICU_NAMESPACE=1' 'CXX=clang++'

Server API =&gt; Command Line Interface
Virtual Directory Support =&gt; disabled
Configuration File (php.ini) Path =&gt; /usr/local/etc/php/5.6
Loaded Configuration File =&gt; /usr/local/etc/php/5.6/php.ini
Scan this dir for additional .ini files =&gt; /usr/local/etc/php/5.6/conf.d
Additional .ini files parsed =&gt; /usr/local/etc/php/5.6/conf.d/ext-opcache.ini

...
...
</code></pre>

<p>Running <code>brew options php</code> and <code>brew options php@5.6</code> yield no information on options to install additional extensions in the homebrew installation process. <code>brew search xdebug</code> yields no packages of interest.</p>

<p>As far as I can tell, Xdebug is not installed by default, and there is currently no mechanism to install Xdebug using homebrew with this new generic <code>php</code> formula.</p>

<p>Does anybody know how to go about installing Xdebug in a sensible way now that the original <code>homebrew/php</code> tap has been deprecated?</p>
