https://thoughtsimproved.wordpress.com/2015/07/06/configure-php-xdebug-netbeans/
In ubuntu 16.04 check if the file /etc/php/5.6/mods-available/xdebug.ini has the below settings added.
zend_extension=xdebug.so
xdebug.default_enable=1
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000