What I’m running:
- Mac OSX 10.6.8
- MAMP 2.0.5
- Netbeans 7.0.1
current settings in php.ini
[xdebug]
xdebug.default_enable=1
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_autostart=1
Looks like my setup for xdebug in the php.ini file are all right in that my webpage shows php errors and notices in the typical orange table.
But when I click the debug button in Netbeans, it generates a URL that starts with http://localhost/sitename/XDEBUGSESSIONblabla instead of http://localhost:8888/sitename/XDEBUGSESSIONblabla
In the php.ini file, I tried the setting
xdebug.remote_host=localhost
as well as
xdebug.remote_host=localhost:8888
I commented out all the zend variables in the php.ini file, but not the zend_extension below [xdebug] i.e. the one that says: zend_extension="/Applications/MAMP/bin/php/php5.3.6/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so"
There is also [xcache-common] – section a little above the [xdebug] section in the php.ini file that also has a rule about the zend_optimizer that I left uncommented because it doesn’t belong to the [Zend] section of the php.ini file.
On a sidenote: I can’t actually find any [Zend] section in my php.ini file but I saw it mentioned in the tutorials I’m trying to follow:
Putting
:8888afterlocalhostin the Netbeans project URL settings a second time did the trick. So it means that after the project was being created, right clicking the project folder and then in the dialogue box under ‘Run Configuration’ the third field from the top says ‘Project URL’. That’s where you can change it after project creation.