Amazon Linux 2023 Where is xdebug?

0

As the title says - is xdebug available for Linux 2023?

mike
gefragt vor einem Jahr1319 Aufrufe
3 Antworten
1

Xdebug is an extension for PHP, and provides a range of features to improve the PHP development experience. Step Debugging. A way to step through your code in your IDE or editor while the script is executing.

how to install Xdebug on Amazon Linux.

  1. Update your system packages:
sudo yum update
  1. Install the EPEL repository, which provides additional packages, including Xdebug:
sudo amazon-linux-extras install epel
  1. Install the appropriate PHP development package:

3.1. For PHP 7.x:

sudo yum install php-devel

3.2. For PHP 8.x:

sudo yum install php80-devel
  1. Install the Xdebug extension:
sudo yum install php-xdebug
  1. Enable and configure Xdebug by editing your php.ini file, typically located at /etc/php.ini or /etc/php.d/xdebug.ini.

Add the following lines to enable remote debugging: ini

zend_extension=xdebug.so
xdebug.mode=debug
xdebug.start_with_request=yes
xdebug.client_host=<YOUR_HOST_IP>
xdebug.client_port=9003
Replace <YOUR_HOST_IP> with the IP address of your development machine.
  1. Restart your web server (Apache or Nginx) to apply the changes:

6.1. For Apache:

sudo systemctl restart httpd

6.2. For Nginx:

sudo systemctl restart nginx
  1. Restart the PHP-FPM service if you are using it:
sudo systemctl restart php-fpm
profile picture
EXPERTE
beantwortet vor einem Jahr
  • Thanks for the attempt but.... These instructions work for Linux 2 but not for 2023. It fails at: sudo amazon-linux-extras install epel with sudo: amazon-linux-extras: command not found Any one know what happened to linux-extras for 2023? Edit: I just found in the release documents: However, AL2023 doesn't support EPEL or EPEL-like repositories.

0

Sorry you are right

i have tested the steps Installation From Source @ https://xdebug.org/docs/install#linux

by installing php-devel and git

so i managed to install php xdebug on amazon 2023 maybe this works for you

note 1: replace git:// with https:// note 2 : run rebuild sith sudeo ./rebuild.sh to compile and deploy xdebug then follow the other steps

profile picture
EXPERTE
beantwortet vor einem Jahr
  • I was hoping to avoid compiling from source but -- since you have been so good as to try it and you say it works I will give it a go. Thanks

  • Good Luck and please update this post if you find another way to do i t

0
sudo yum install php-pear
sudo yum install php-devel
sudo pecl install xdebug
sudo systemctl restart httpd
sudo systemctl restart php-fpm

add zend_extension=xdebug to php.ini

Shiqing
beantwortet vor 3 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen