yes PHP is a serious language, it is (often) even faster than Python 😀
but this is also very good Python news: Python code now running on GPUs? wow that must give the most massive speed ever! 😀
sharing is caring, so here is the solution: after installing everything like it should
xdebug is great but the config and to get it up and running + eclipse is still a bit of a chaos X-D (sorry… search for more howtos)
hostnamectl; # tested on very latest Debian :) Static hostname: debian13 Virtualization: kvm Operating System: Debian GNU/Linux trixie/sid Kernel: Linux 6.12.12-amd64 Architecture: x86-64 cat /etc/php/8.4/cli/conf.d/20-xdebug.ini zend_extension="/usr/lib/php/20240924/xdebug.so" xdebug.remote_enable=1 xdebug.remote_autostart=on xdebug.client_port=9003 xdebug.log=/var/log/xdebug.log xdebug.client_host=localhost xdebug.discover_client_host = true xdebug.mode = debug,develop
make php binary known to eclipse
new possible problem: “eclipse could not create a default server for the launch”
go ahead and create server manually
other possible problems: eclipse can not make connection to xdebug: session “hanging”
multiple pitfalls:
su - root find / - iname xdebug.so; # find absolute path to binary # via echo 'phpinfo();' >> /var/www/html/info.php; # then view it in browser # verify that this is the ini that apache2 is loading vim /etc/php/8.3/apache2/conf.d/20-xdebug.ini # inset absolute path to xdebug here (this was tested for ubuntu24) zend_extension=/usr/lib/php/20230831/xdebug.so xdebug.mode = debug xdebug.remote_enable = 1 xdebug.remote_autostart=1 xdebug.remote_log=/tmp/xdebug.log # then service apache2 restart # also on ubuntu try (also try reboot system!) systemctl stop apparmor systemctl disable apparmor
if xdebug was already configured by manually adding a new server this might not be required!
this is because eclipse pdt opens a default port 9000 for xdebug to connect
xdebug default port is 9003
so 1. need to tell eclipse to listen on 9003 port
2. now the magic trick that ChatGPT will not be able to tell the developer: xdebug jumps into action only if eclipse calls browser with specific “trigger” parameter-argument-input
==> /var/log/xdebug.log <== [6104] Log opened at 2025-03-08 13:39:08.469054 [6104] [Config] WARN: Not setting up control socket with default value due to unavailable 'tsc' clock [6104] [Config] INFO: Trigger value for 'XDEBUG_TRIGGER' not found, falling back to 'XDEBUG_SESSION' [6104] [Config] INFO: Trigger value for 'XDEBUG_SESSION' not found, so not activating [6104] Log closed at 2025-03-08 13:39:08.469383
so modify how eclipse is starting the browser, to trigger xdebug start:
-url %URL%&XDEBUG_SESSION_START=ECLIPSE_DBGP
support this excellent open source project 🙂
downloads: download kvm vm
- https://dwaves.de/downloads/debian13-DevPHP-distribution.qcow2.zst (3.4GBytes packed 11GBytes unpacked)
- https://dwaves.de/downloads/debian13-DevPHP-distribution.qcow2.zst.sha512sum.txt
it is usable but it might crashing at random times (especially in the settings?)
sudo bash find / -name eclipse.ini echo '-Xms512m' >> /home/www-data/eclipse/php-2025-032/eclipse/eclipse.ini echo '-Xmx2048m' >> /home/www-data/eclipse/php-2025-032/eclipse/eclipse.ini
or it might be other problems, here is the log:
https://dwaves.de/wp-content/uploads/2025/03/hs_err_pid1479.log_.zip
php enable error output to browser
# per default errors are only output to logfile # if errors should also be output to browser: vim /etc/php/8.*/apache2/php.ini error_reporting = E_ALL & ~E_DEPRECATED ; This directive controls whether or not and where PHP will output errors, ; notices and warnings too. Error output is very useful during development, but ; it could be very dangerous in production environments. Depending on the code ; which is triggering the error, sensitive information could potentially leak ; out of your application such as database usernames and passwords or worse. ; For production environments, we recommend logging errors rather than ; sending them to STDOUT. ; Possible Values: ; Off = Do not display any errors ; stderr = Display errors to STDERR (affects only CGI/CLI binaries!) ; On or stdout = Display errors to STDOUT ; Default Value: On ; Development Value: On ; Production Value: Off ; https://php.net/display-errors display_errors = On ; The display of errors which occur during PHP's startup sequence are handled ; separately from display_errors. We strongly recommend you set this to 'off' ; for production servers to avoid leaking configuration details. ; Default Value: On ; Development Value: On ; Production Value: Off ; https://php.net/display-startup-errors display_startup_errors = On # :wq write and quit then restart apache2 systemctl restart apache2
liked this article?
- only together we can create a truly free world
- plz support dwaves to keep it up & running!
- (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
- really really hate advertisement
- contribute: whenever a solution was found, blog about it for others to find!
- talk about, recommend & link to this blog and articles
- thanks to all who contribute!
