Preamble
After many hours, I have been unable to get NetBeans to connect to xdebug. Some months ago, after upgrading from an old version of MAMP to MAMP
Xdebug will only connect if there is an index.php file in your project folder, so check to make sure you have one.
I asked the same thing and got this quite good answer: How to track execution time of each line / block of lines / methods in PHP?, beside that i have this answer also on a currently running other question with the same content.
Some additional notes on that (stuff i've collected in other SO posts in my own research with this problem):
xdebug.idekey=netbeans-xdebug
.;
at its begninning), so Xdebug is actually loaded.On clean download and install of netbeans working on xampp, xdebug worked except would not stop at breakpoints. Changed php.ini to: xdebug.remote_enable = 1 (from 0) and xdebug worked as expected!
it works for me now. I have LAMP installed. I modified according to all answers from above, started apache2 and now it flies... i am happy... for some time i thought to switch to phpstorm, but I reconsidered... tweak a little more... et voila. it's working.
Here what I have in php.ini
zend_extension = /usr/lib/php5/20121212/xdebug.so
xdebug.max_nesting_level = 250
xdebug.auto_trace=On
xdebug.remote_enable=On
xdebug.remote_port=9001
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_log="/var/log/xdebug.log"
xdebug.trace_output_dir=/var/www/AMRO
xdebug.idekey="netbeans-xdebug"