Install homebrew → https://brew.sh
Install beforehand NginX, MariaDB, DnsMasq and PHP7.2 with Composer
$ brew install php nginx mariadb dnsmasq composer
While at it, install CGR to isolate future problems with composer lobal require
(see laravel/valet#199)
$ composer global require consolidation/cgr
From now on use cgr install namespace/package instead of composer global require!
Install valet → https://laravel.com/docs/master/valet#installation (but with cgr, remember)
Install Xdebug
$ (sudo) pecl install xdebug
Copy the path to the extension!
In /usr/local/etc/php/7.2/conf.d
create a new file xdebug.ini
with the following content:
[xdebug]
zend_extension=/usr/local/Cellar/php/7.2.x/pecl/20170718/xdebug.so
xdebug.remote_enable=1
xdebug.remote_autostart=1
xdebug.remote_port=9000
- under Preferences ➤ Languages & Frameworks ➤ PHP update CLI Interpreter with
/usr/local/bin/php
. - in sub-module Debug update Xdebug by unchecking the two force break checkboxes (leave port to 9000).
Install https://github.com/BrianGilbert/xdebug-helper-for-firefox
Xdebug helper for Firefox.
Activate listening in PHPStorm:
Happy debugging!