Mac + php + xdebug + phpstorm configure xdebug in Apple. download the xdebug file
Http://xdebug.org/wizard.php
Copy the source code of phpinfo () to the text box. xdebug prompts you how to configure and download the version of xdebug.
All:
Http://www.xdebug.org/download.php
InstructionsDownload xdebug-2.3.3.tgzUnpack the downloaded file with tar -xvzf xdebug-2.3.3.tgzRun: cd xdebug-2.3.3Run: phpize (See the FAQ if you don't have phpize.As part of its output it should show:Configuring for:...Zend Module Api No: 20121212Zend Extension Api No: 220121212If it does not, you are using the wrong phpize. Please follow this FAQ entry and skip the next step.Run: ./configureRun: makeRun: cp modules/xdebug.so /usr/lib/php/extensions/no-debug-non-zts-20121212Edit /etc/php.ini and add the linezend_extension = /usr/lib/php/extensions/no-debug-non-zts-20121212/xdebug.soRestart the webserver
There are many installation tips on the xdebug official website. The following problems may occur:
Phpize is not installed: Then brew is installed, and then autoconf is installed.
2. solve the problem of incomplete related components
Problem Description: The php extension is installed when the Mac system is upgraded to 10.9 (mavericks). the following error is prompted when the phpize command is executed: Cannot find autoconf. please check your autoconf installationand the $ PHP_AUTOCONF environment variable. solution: install Homebrew first. if the following link is invalid, go to the brew official website. Http://brew.sh/
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Then install autoconf: brew install autoconf
3. configure php. ini
On the xdebug official website, you can only correctly configure xdebug but cannot configure it with phpstorm. Add the following code to the end of php. ini:
[xdebug]zend_extension="/usr/lib/php/extensions/no-debug-non-zts-20121212/xdebug.so"xdebug.remote_enable = Onxdebug.remote_handler = "dbgp"xdebug.remote_host = "localhost"xdebug.remote_port = 9000xdebug.idekey = PHPSTROM
4. configure phpstorm
Open phpStorm,
-Go to File> Settings> PHP> Servers. enter the server information here. set "name" to "localhost", "host" to "localhost", "port" to "80", and "debugger" to "XDebug ".
-Go to File> Settings> PHP> Debug. the XDebug tab is displayed. set port to 9000.
-Choose File> Settings> PHP> Debug> DBGp Proxy. set phpStorm as the IDE key, localhost as the host, and 80 as the port.
-Click OK to exit the settings.
Enable the listener (phone button) in phpStorm ).
5. chrome xdebug configuration
Configure it as "phpStorm" in the IDE key"
Project address: https://github.com/mac-cain13/xdebug-helper-for-chrome
Now you can complete the configuration. if you have any questions, you can leave a message for us to discuss.
6. others:
Restart apache
Sudo apachectl restart
Modify php. ini permissions
Sudo chmod 0777 php. ini
Edit the php. ini file
Sudo vi php. ini (modify I, exit: q, save and exit: wq)