Header Ads

Install XDebug in php7.2 and ubuntu 18.04 LTS

Install XDebug in php7.2 and ubuntu 18.04 LTS

Install XDebug in php7.2 and ubuntu 18.04 LTS

1, Install PECL on ubuntu 18.04 LTS with php7.2

sudo apt install php-pear
sudo apt-get install php7.2-dev

2, Install XDebug in ubuntu 18.04 LTS

pecl install xdebug

This is log: zend_extension=/usr/lib/php/20170718/xdebug.so
This is path of XDebug


3, Open file php and add config xebug

sudo vim /etc/php/7.2/mods-available/xdebug.ini

and paste content:


zend_extension=/usr/lib/php/20170718/xdebug.so
xdebug.idekey="phpstorm"
xdebug.remote_enable=1
xdebug.remote_connect_back=1
xdebug.remote_port=9000
xdebug.max_nesting_level=300
xdebug.scream=0
xdebug.cli_color=1
xdebug.show_local_vars=1

 

4, Enable XDebug

sudo ln -sf /etc/php/7.2/mods-available/xdebug.ini /etc/php/7.2/fpm/conf.d/20-xdebug.ini
sudo service php7.2-fpm restart


5, Check Xdebug work

php -v

Extra: run again command:

sudo ln -sf /etc/php/7.2/mods-available/xdebug.ini /etc/php/7.2/cli/conf.d/20-xdebug.ini
sudo service php7.2-fpm restart


And check again xdebug
Thanks!!

 

No comments