The Mac comes with a version of php5.5, which was originally installed with homebrew Xdebug
Command: Brew Install Php55-xdebug
However, there is still a problem using phpstorm after installation. Php-v does not show a xdebug.
The process should be right, after all, Phpstorm official website is hung this tutorial:
Https://confluence.jetbrains.com/display/PhpStorm/Xdebug+Installation+Guide
Later saw a tutorial said to re-install, so
Brew Uninstall Php55
Brew Install PHP56
Use the Brew install PHP56-XDEBUG hint to brew link php56
Then brew link Php56 said no permission to write/usr/local/sbin
Google has been prompted to say that it needs to run brew doctor
Then find the appropriate warnning, saying that the owner of the Change directory is required:
sudo chown-r $yourusername/usr/local/sbin
After the command has been knocked out, the brew link runs successfully.
Last Php-v
Appear:
Dyld:library not loaded:/usr/local/opt/libpng/lib/libpng16.16.dylib referenced from:/usr/local/bin/php Reason:inco Mpatible Library version:php requires version 40.0.0 or later, but Libpng16.16.dylib provides version 37.0.0 TRACE/BP
I thought it was a problem with this dynamic library, but finding the latest version of the dynamic library link used to be an old problem.
Later find information found that this is a brew of a bug, after the update can be resolved.
Brew Update &brew Upgrade
And then
Brew Reinstall PHP56
After running PHP-V, it did install successfully and successfully integrated Xdebug
MAC Homebrew Installation php56 to Phpstorm process issues summary