How to install the Xdebug extension via PECL in cPanel.
Xdebug is a PHP extension that provides debugging and profiling capabilities. It uses the DBGp debugging protocol. xdebug also provide profiling information for PHP scripts, code coverage analysis, and capabilities to debug the scripts connected with a debug client
The Xdebug extension available through PECL requires PHP 7.2 or above, you can check the below link to see the dependencies and available Releases.
– Installation Procedure
1. log in to WHM as the root user
2. Navigate to- Home > Software > Module Installers
3. Click on the “Manage’ link for PECL
4. Select “ea-php72” or above from the dropdown menu
5. Click Apply next to the PHP version dropdown
6. Type the following into the box to the left of the “Install Now” button: xdebug
7. Click the “Install now” button
Also, you can install xdebug via the command line.
1. log in to the server via SSH or Terminal as the root user
2. You can use the below commands to find the locations of your PECL binaries:
– find /opt/cpanel -name pecl | grep bin
3. You can install xdebug for ea-php7.3 using below commnd
/opt/cpanel/ea-php73/root/usr/bin/pecl install xdebug
after the installation is completed you can verify the installation using a PHP info file