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.
- 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 - Unpack the tarball with
tar -xzf xdebug-3.0.4.tgz
- Change directory with
cd xdebug-3.0.4
- Run Local by Flywheel’s
phpize
binary. In my case it was located heresudo ~/.config/Local/lightning-services/php-8.0.0+3/bin/linux/bin/phpize
this may change according to your setup. - 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.