開啟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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM