Xedebug with Cakephp and Netbeans
I’m using Debian and Xedebug is available via the package manager.
apt-get install php5-xdebug
Configure PHP to use xdebug.
vi /etc/php5/conf.d/xdebug.ini
; configuration for php xdebug module
zend_extension=/usr/lib/php5/20090626+lfs/xdebug.soxdebug.remote_enable = 1
xdebug.remote_handler = dbgp
xdebug.remote_mode = req
xdebug.remote_host = 10.11.228.223 ; [Remote address if debugging from a remote client]
xdebug.remote_port = 9000
xdebug.max_nesting_level = 500 ; [This may be needed for larger scripts]
xdebug.profiler_enable_trigger = 1 ; [Use trigger to enable with something like chrome/firefox extensions]
;xdebug.profiler_enable = 1
Configure netbeans under Tool > Options. Make sure PHP is configured with the proper port. You can remove the option to stop at first line. You must also make sure the project has the webroot defined under sources. Without this setting the debugger will not stop at the breakpoints.
