Using the environment Masos 10.12 using Mamp installed PHP environment
in the newly installed system, installs the Xdebug, has encountered some minor problems;P.S. Re-installed in accordance with the xdebug of the official website, the last installation failed to remove the Xdebug files, and then installed in accordance with the official website, the success! Revelation: Unix and Linux have a lot of open source software need to compile \ Configuration can be used, the general process is to download, compile, configure, and then use. So, I translate the process of installing Xdebug on Mac; 0\ preparation 1) Install Homebrew Homebrew is a package management tool, can be very convenient to download MacOS without the program, and can automatically solve the problem of packet dependencies; 1\ Download xdebug-2.5.4.tgz:http://xdebug.org/files/xdebug-2.5.4.tgz 2\ decompression xdebug-2.5.4.tgz Enter the command in the terminal (each of the following steps is entered in the terminal, the same as) tar- xvzf [Download directory]/xdebug-2.5.4.tgz 3\ move to the extracted Xdebug directory CD xdebug-2.5.4.tgz 4\ add extensions dynamically with Phpize Note: phpize If you do not have 1\ you can use brew Install Php7.0-dev for installation
2\ himself is using MAMP installed PHP environment, so use the PHP version of the phpize I want to use, I am using PHP7.1.1, so phpize in/APPLICATIONS/MAMP/BIN/PHP/PHP7.1.1/ Bin/phpize, so, I entered in the terminal is the/applications/mamp/bin/php/php7.1.1/bin/phpize, but not the official website gives the phpize5\ is configured./configure NOTE: I am using the MAMP php7.1.1, so the command entered is:./configure--with-php-config=/applications/mamp/bin/php/ Php7.1.1/bin/php-config 6\ compile make 7\ copy the compiled xdebug extension to the PHP extension library CP modules/xdebug.so [you install the PHP directory]bin/php/php7.1.1 /lib/php/extensions/no-debug-non-zts-20160303 8\ Modify php.ini add Zend_ in [the directory where you install PHP]/bin/php/php7.1.1/conf/php.ini Extension = [You install PHP directory]/bin/php/php7.1.1/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so 9\ reboot Apache installation Success Summary: Pay special attention to the 4th and 5th steps, choose the version of PHP you want to debug and the directory where
[Novice] Install xdebug in MacOS Environment