I copied the xdebug options from the apache2 / php.ini file to my cli / php.ini (command line interface).
The path to the file on ubuntu 10.04, set using apt-get, is /etc/php5/cli/php.ini .
My cli / php.ini file now has the following settings:
xdebug.remote_enable=On xdebug.remote_handler=dbgp xdebug.remote_host=localhost xdebug.remote_port=9000 xdebug.idekey=netbeans-xdebug xdebug.remote_mode=req
Then I can right-click on the test file and select Debug (shortcut CTRL + SHIFT + F5 )
source share