Getting Xdebug to work on a Linux Virtualbox

On a VirtualBox I use with Lubuntu installed I was having trouble getting Xdebug to work (in a combination with Netbeans). In order to get it to work I needed to add the following property to /etc/php5/mods-available/xdebug.ini:

xdebug.remote_enable=1