Method to install xdebug 3. Homolog in Ubuntu 22.04 , AlmaLinux 8.7
- 7.4
- 8.0
- 8.1
- Php
Before begin initialize a setup xdebug you need check the verion php.
- Check the version php
sudo php -version
Install Xdebug 3 + Php Versions + PhpCGI(Ubuntu)
- Install php 7.4
sudo apt-get update -y
sudo apt-get install php-xdebug php7.4-xdebug php7.4 php7.4-cgi
- Install php 8.0
sudo apt-get update -y
sudo apt-get install php-xdebug php8.0-xdebug php8.0 php8.0-cgi
- Install php 8.1
sudo apt-get update -y
sudo apt-get install php-xdebug php8.1-xdebug php8.1 php8.1-cgi
Install Xdebug 3 + Php Versions + PhpCGI(Rhel)
- Pack-Remi Php 8.0
dnf config-manager --set-enabled remi
dnf -y module reset php
dnf -y module enable php:remi-8.0
yum -y upgrade php*
- Change Version PHP
sudo update-alternatives --config php
sudo update-alternatives --config phar
sudo update-alternatives --config phar.phar
- Configure extension xdebug.ini for environment Localhost
Check the location the xdebug.ini
sudo php -i |grep xdebug.ini
- Edit the xdebug.ini file
zend_extension=xdebug
xdebug.remote_enable = 1
xdebug.client_port=9004
xdebug.client_host=127.0.0.1
xdebug.show_error_trace = 1
xdebug.start_with_request=yes
xdebug.mode=debug
For phpstorm you need put in the file
xdebug.idekey=PHPSTORM
-
Settings(ctrl+alt+s)
-
PHP
-
Debug