I don't think 7.2 xdebug is available in Homebrew yet, so I had to go with 7.1
- Install xcode
- Install Homebrew
- Add Homebrew PHP
-
brew tap homebrew/homebrew-php
-
-
Install Xdebug
-
brew install homebrew/php/php71-xdebug
-
-
Add to .bashrc: export PATH="$(brew --prefix homebrew/php/php71)/bin:$PATH"
-
source ~/.bashrc
-
-
Check w/ php -i | grep xdebug
-
If you get an error about readline: ln -s /usr/local/Cellar/readline/7.0.3_1/lib/libreadline.7.dylib /usr/local/opt/readline/lib/
-