Introduction
The Xdebug extension provides the following features:
- Stack and function traces in error messages with:
- Full parameter display for user-defined functions
- Function name, file name, and line indications
- Support for member functions
- Memory allocation
- Protection for infinite recursions
Xdebug also provides:
- Profiling information for PHP scripts
- Code coverage analysis
- Capabilities to debug your scripts interactively with a debug client
Installation Procedure
- Login to the server via SSH or the WHM / Terminal interface as the root user
- Call the PECL command line for your desired PHP version.
/opt/cpanel/ea-phpXX/root/usr/bin/pecl
Note: Replace XX with the PHP version you want to install Xdebug on. - Run the PECL install command:
/opt/cpanel/ea-phpXX/root/usr/bin/pecl install xdebug
- Confirm the extension is installed:
/opt/cpanel/ea-phpXX/root/usr/bin/php -m | grep xdebug
- If Xebug is installed, only Xdebug should return:
[root@server ~]# /opt/cpanel/ea-php81/root/usr/bin/php -m | grep xdebug
xdebug - Now that Xdebug is installed, Apache and PHP-FPM must be restarted:
/scripts/restartsrv_httpd
/scripts/restartsrv_apache_php_fpm
Comments
0 comments
Article is closed for comments.