xDebug seems OK installed, but not connecting with NetBeans

白昼怎懂夜的黑 提交于 2019-12-06 06:12:01
How come PHP_INFO() seemed to find my PHP.INI file under ../MAMP/... and not when doing PMP -m when it is read from /etc ?

phpinfo() uses MAMP's PHP binary, while CLI uses your OS one.

How can I get PHP to always find the INI file under MAMP so I dont have to use two PHP.INI files to et PHPINFO() and PHP -m to work?

Leave the OS PHP untouched so you don't have problem upgrading and tweak the one bubled with MAMP as you need.

How can I resolve the NetBeans problem now that xDebug seems to be installed correctly but still not working in NetBeans? Something with this need for dual php.ini? Could I have compiled xdebug wrong, how to know? Something with php versions in xdebug / php? How to check?

Download the latest version of MAMP which includes xdebug extension compiled and add this to your php.ini.

zend_extension="/Applications/MAMP/bin/php/php5.3.6/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so"
xdebug.remote_host=localhost
xdebug.remote_port=9001
xdebug.remote_enable=1
xdebug.idekey="netbeans-xdebug"
xdebug.remote_log="/Applications/MAMP/logs/xdebug.log"

I use port 9001 as OSX doesn't seem to like the default.

I downloaded the wrong xDebug.so from Komodo and somehow also my own build was no good. Downloaded again and now its OK. Wow, this took me MANY hours, and no one could help either! /PM

I checked and re-checked all the settings and setup instructions and still it appeared that XDebug didn't work. In the end I restarted my Mac and it magically started working. Maybe this will help someone in the same position as me.

This is what working for me

brew install php55-xdebug

  • grab the ini path, then paste the following to the last
    php -i | grep 'Configuration File'
    vim /usr/local/etc/php/5.5/php.ini

  • add the following

    zend_extension="/usr/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so"

    xdebug.default_enable=1
    xdebug.remote_enable=1
    xdebug.remote_handler=dbgp
    xdebug.remote_host=localhost
    xdebug.remote_port=9001
    xdebug.remote_autostart=1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!