the possibility to step (!) debug requests, as they appear on the server is a neat feature.
- installed GNU Linux Debian 11 + MATE Desktop
- installed apache2 + php8.1
- installed eclipse
- installed xdebug
- and as usually, xdebug + eclipse do not like to cooperate out of the box, why?
- because they can not agree on what port to use
- latest eclipse wants to connect to xdebug per default on port 9000
- latest xdebug wants to connect to eclipse per default on por 9003
- c’mon guys. get in contact with each other and set a standard
- (this has cost me about 2h of debugging around eclipse preferences and xdebug.ini files)
- so the below guide is still usable:
-
- ``` php -v; # is also a good way to test if xdebug is loaded when php is started vim /etc/php/8.1/apache2/php.ini; # no xdebug related settings are here vim /etc/php/8.1/cli/conf.d/20-xdebug.ini; # they are all here and read like:
[XDebug]
zend_extension=xdebug.so
xdebug.mode=debug
xdebug.start_with_request=trigger
xdebug.start_with_request = 1
xdebug.remote_autostart = on
xdebug.log_level = 7
xdebug.profiler_enable_trigger = 1
xdebug.profiler_enable = 0
xdebug.remote_enable = 1
xdebug.profiler_output_dir = "/tmp"
systemctl restart apache; # changes need to be made active by restarting webserver- when everything is installed go to eclipse -> window -> preferences - [![](https://dwaves.de/wp-content/uploads/2022/03/eclipse-change-default-debugger-to-xdebug-and-xdebug-port-to-9003.png)](https://dwaves.de/wp-content/uploads/2022/03/eclipse-change-default-debugger-to-xdebug-and-xdebug-port-to-9003.png) - and also here: - [![](https://dwaves.de/wp-content/uploads/2022/03/eclipse-change-default-debugger-to-xdebug-and-xdebug-port-to-9003_2.png)](https://dwaves.de/wp-content/uploads/2022/03/eclipse-change-default-debugger-to-xdebug-and-xdebug-port-to-9003_2.png) - if the developer r-click in the empty white space next to the code -> - [![](https://dwaves.de/wp-content/uploads/2022/03/eclipse-xdebug-php-debug-as-web-application.png)](https://dwaves.de/wp-content/uploads/2022/03/eclipse-xdebug-php-debug-as-web-application.png) - sees this message… - - [![](https://dwaves.de/wp-content/uploads/2022/03/2022-03-YES-XDEBUG-IS-TALKING-TO-ECLIPSE-FINALLY-HURRAY.png)](https://dwaves.de/wp-content/uploads/2022/03/2022-03-YES-XDEBUG-IS-TALKING-TO-ECLIPSE-FINALLY-HURRAY.png) - releave… good god thanks they are talking to each other!
what is btw excellent done is this “Open Source project funding and progress status page”:
so every user can see, what is the progress “where is it hanging” of the software project, is it a lack of funding?
suggestion: what still missing a “still todo” todo list, where user’s can post suggestions and vote on features 🙂
#linux #gnu #gnulinux #opensource #administration #sysops #php #apache2 #webserver #web #dev #html #javascript #apache #eclipse #xdebug #debugging #devphp #webdev #webdevelopment
Originally posted at: https://dwaves.de/2022/03/21/how-to-setup-basic-lamp-stack-gnu-linux-debian-11-apache2-php8-1-mariadb-how-to-install-xdebug-step-debugging-php-requests-in-eclipse-lamp-web-development-stack/