Skip to content

Install xdebug for php 7

Get started with XDebug

Let’s first install the debugger :

# sudo apt-get install php-xdebug

Then enable the extension :

# sudo phpenmod xdebug

Now check the file under /etc/php/7.0/mods-available/xdebug.ini and the following lines into it :

zend_extension=xdebug.so
xdebug.idekey=netbeans-xdebug
xdebug.remote_enable= On
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=localhost
xdebug.remote_port=9000

Restart Apache:
sudo service apache2 restart