Updating Xdebug to the latest version or at least version 3.0.4

I have been trying to update Xdebug version 3.0.0, that comes with Local by Flywheel, to the latest version or at least 3.0.4.

After spending countless hours, I couldn’t do that.

I am on a Debian based system. Until now I have tried to replace Local by Flywheel’s xdebug.so with my local Xdebug; update it from site shell with pecl but it is all vain.

Here is what it outputs in shell

Xdebug requires Zend Engine API version 420210902.
The Zend Engine API version 420200930 which is installed, is outdated.

Xdebug FAQ about this situation didn’t help me.

Are there any ways to achieve this?

After spending another day, finally I have solved the issue.

So for those who want to benefit it, here is the step by step updating Xdebug for Local by Flywheel on Debian systems.

  1. Download the version of Xdebug from here in my case it was 3.0.4 so I have changed the tgz’s filename to 3.0.4
  2. Unpack the tarball with tar -xzf xdebug-3.0.4.tgz
  3. Change directory with cd xdebug-3.0.4
  4. Run Local by Flywheel’s phpize binary. In my case it was located here sudo ~/.config/Local/lightning-services/php-8.0.0+3/bin/linux/bin/phpize this may change according to your setup.
  5. Edit Local by Flywheel’s php-config in my case it was located here ~/.config/Local/lightning-services/php-8.0.0+3/bin/linux/bin/php-config. Replace these values
SED="/usr/bin/sed"
prefix="~/.config/Local/lightning-services/php-8.0.0+3/bin/linux/"
datarootdir="/usr/share"
extension_dir='~/.config/Local/lightning-services/php-8.0.0+3/bin/linux/lib/php/extensions/no-debug-non-zts-20200930'
ini_path="/etc/php/8.0/cli"

Save the file
Note: Make sure you have installed php8.0 in your local machine
6. Run command sudo ./configure --with-php-config=~/.config/Local/lightning-services/php-8.0.0+3/bin/linux/bin/php-config --enable-xdebug
7. sudo make && sudo make install
8. Now you should be able to see xdebug 3.0.4 installed from the php -i or phpinfo page of your installation.
9. Add xdebug.mode=debug to your php.ini.hbs file
10. Restart your website. Now you should be able to debug with 3.0.4 and this will solve the Xdebug 3.0.0’s 502 bug.

image

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.