문제

I'm trying to debug PHP code with Netbeans 8 (with Java 1.8.0) on a MAMP 3.0.3 (PHP 5.5.10) server, the whole thing running on Mac OS X 10.9.2. But when I launch the debug, Netbeans shows a progress bar saying "Waiting For Connection (netbeans-xdebug)". it never stops, so I suppose it never gets a connection. And of course, the execution of my webapp never stops on my breakpoints.

Here the xdebug configuration in my php.ini:

[xdebug]
zend_extension="/Applications/MAMP/bin/php/php5.5.10/lib/php/extensions/no-debug-non-zts-20121212/xdebug.so"
xdebug.default_enable=1
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_autostart=on
xdebug.idekey="netbeans-xdebug"
xdebug.remote_log="/Applications/MAMP/logs/xdebug_remote.log"

I tried many things found on forums or even here on stackoverflow, but nothing works. Among them: change the port (in the php.ini and the debug conf in Netbeans), change the localhost to 127.0.0.1 or to my real IP, comment out the remote host, check if my timezone was set in the php.ini (it was), load my waebapp with a parameter XDEBUG_SESSION_START=netbeans-xdebug and much more.

Any idea? I'm open to any suggestion, at this point...

도움이 되었습니까?

해결책

Double check your path mapping. https://blogs.oracle.com/netbeansphp/entry/path_mapping_in_php_debugger

Then download a trial of PHPStorm and see how that works. If it works fine, consider switching to it. Honestly not trying to be smart, I think its a valid solution to this issue.

http://www.jetbrains.com/phpstorm/

http://confluence.jetbrains.com/display/PhpStorm/Zero-configuration+Web+Application+Debugging+with+Xdebug+and+PhpStorm

다른 팁

I added a webroot and an index file in the Netbeans configuration (copying from a colleague's configuration, which is working properly), and now, it works. I won't pretend I really understand why. It seems really fragile, so I won't mess with it just for the sake of understanding...

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top