Note: see https://xdebug.org/docs/install for installation notes
- Update your system modules:
sudo apt-get update; sudo apt-get dist-upgrade
- Install pecl:
sudo apt install php-pear
- Install Xdebug:
sudo pecl install xdebug
- add
zend_extension=/usr/lib/php/20180731/xdebug.so
to the files
/etc/php/7.3/apache2/php.ini
(and, in ubuntu, add it to the following file as well):
/etc/php/7.3/cli/php.ini
- run
php -m -c
to verify Xdebug has been installed (it should show up under the section 'Zend Modules]) - restart apache:
sudo service apache2 restart