Xdebug with php 7 on ubuntu apache2 not working

there was actually this problem, and I had to take the time to figure out the solution: (if any previous versions of php where they are installed, be sure to completely get rid of them first. If necessary, clean and reinstall apache2 and php7)

first:

> sudo apt-get install php-xdebug 

then edit the php.ini php 7 file:

 > sudo gedit /etc/php/7.0/apache2/php.ini 

and just add below:

 xdebug.remote_enable = On 

save and of course then:

 > sudo service apache2 restart 
+5
source share
1 answer

Download stable version of xdebug 2.4.0

 wget -c "http://xdebug.org/files/xdebug-2.4.0.tgz" 

Extract archive

 tar -xf xdebug-2.4.0.tgz cd xdebug-2.4.0/ 

Build extension

 phpize ./configure make && make install 

Enable extension

 echo "zend_extension=xdebug.so" > /etc/apache2/mods-available/xdebug.ini ln -sf /etc/apache2/mods-available/xdebug.ini /etc/apache2/mods-enabled/20-xdebug.ini ln -sf /etc/apache2/mods-available/xdebug.ini /etc/apache2/mods-enabled/20-xdebug.ini service php7.0-fpm restart 

Check it out

 php -m | grep -i xdebug 

It should print:

 xdebug Xdebug 
+2
source

All Articles