Question

I've setup Netbeans & Xdebug several times on a windows machine, but this is my first time on a mac. Should be pretty much the same, but I can't get it going.

My php.ini settings:

zend_extension="/opt/local/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so"
1922 [xdebug]
1923 xdebug.remote_autostart=0
1924 xdebug.remote_enable=1
1925 xdebug.remote_handler="dbgp"
1926 xdebug.remote_mode="req"
1927 xdebug.remote_port=9002
1928 xdebug.remote_host=127.0.0.1
1929 xdebug.profiler_enable=0
1930 xdebug.profiler_output_dir="/tmp/"
1931 xdebug.idekey="netbeans-xdebug"
1932 xdebug.remote_log="/home/mmutrux/xdebug.log"

This loads up in the phpinfo:

enter image description here

My Netbeans settings use the same port (9002) enter image description here

What did I miss?

Was it helpful?

Solution

It turns out that Xdebug will only connect if I run it on my index.php file.

I started with a plain index.html file and a getData.php file. Running the debugger on getData.php did not work until i added an index php page and ran the debugger on that. From that point on (with the debugger running) I could set breakpoints on all other php files and get the expected behavior.

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top