开启MAMP自带的xdebug

按照 http://www.dotvoid.com/2012/09/using-xdebug-in-mamp/所说的,把下列内容

 [xdebug]

;zend_extension="/Applications/MAMP/bin/php/php5.4.4/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so"
更改到了
[xdebug]
zend_extension="/Applications/MAMP/bin/php/php5.4.4/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so"
xdebug.remote_host=127.0.0.1 
xdebug.remote_enable = 1

但是查看phpinfo(),依然找不到xdebug 

纠结了许久,终于再stackoverflow找到了答案,

http://stackoverflow.com/questions/15114392/xdebug-not-running-on-mamp

经测试可行: 

I don't know if it's too late but i'm sure that someone will need the real answer.

To solve yo online have to change php.ini in the correct path...

For php 5.4.10 there are two php.ini and I changed both and it works for me. They are in:

MAMP/conf/php5.4.10/php.ini
and
MAMP/bin/php/php5.4.10/conf/php.ini

When I changed the second one, I reload MAMP and IT WORKS!! If you want to know if it's working, open MAMP on localhost, click phpinfo and find xdebug.

Also, I have to say that I changed in httpd.conf (MAMP/conf/apache) the port 8888 to 80 (you have to change Listen:8888 to Listen:80 and local_host:8888 to local_host:80. (without _) In that case, yo only have to go to http: / / localhost to see your projects

原文地址:https://www.cnblogs.com/vagrantatbeijing/p/3467487.html