First, install xdebug package on system:
$ sudo yum install php-pecl-xdebug.x86_64Or with DNF:
$ sudo dnf install php-xdebugOpen and edit the php.ini file:
$ sudo vim /etc/php.iniAdd the following 2 lines to the end of the file:
zend_extension="/usr/lib64/php/modules/xdebug.so"`
xdebug.remote_enable = 1The value for zend_extension will the directory in which xdebug.so is installed in. To check the directory, run:
$ updatedb && locate xdebug.soFinally, if your have an Nginx server, we should restart the PHP processor php-fpm:
$ sudo systemctl restart php-fpmOr if you have a Apache server, we should restart the httpd server:
$ sudo systemctl restart httpd