How to install Xdebug on CentOS?

yum update
yum install php-devel gcc gcc-c++ autoconf automake
yum install php-pear
pecl install Xdebug

Then add the following line to the php.ini file:

zend_extension=/usr/lib64/php/modules/xdebug.so

A post was split to a new topic: May be guide me to use X-Debugger in visual Studio Code instead of PHPstorm?