How to downgrade php xdebug version
I also face same problem today. Here is how I solve this:
remove xdebug 3.0.1 first
sudo apt purge php-xdebug
sudo apt remove php-xdebug
Prerequisit:
sudo apt install php7.2-dev
Now clone xdebug repo and compiled:
git clone git://github.com/xdebug/xdebug.git
git checkout xdebug_2_9
phpize
./configure --enable-xdebug
sudo make install
sudo service apache2 restart
Now add following to your php.ini
zend_extension=xdebug.so
xdebug.remote_enable=1
xdebug.remote_port=9000
Best of luck!
If you're on PHP 7.1 then you have to execute the following
apt-get install php-all-dev
git clone --branch xdebug_2_9 --single-branch git://github.com/xdebug/xdebug.git
cd xdebug
phpize7.1
./configure --enable-xdebug
make
make install
phpenmod xdebug
echo "zend_extension=/usr/lib/php/20160303/xdebug.so" > /etc/php/7.1/mods-available/xdebug.ini