ddev / ddev

Docker-based local PHP+Node.js web development environments
https://ddev.com
Apache License 2.0
2.47k stars 585 forks source link

Consider downgrade of php-xdebug, for #5633 #6159

Closed rfay closed 1 month ago

rfay commented 1 month ago

php-xdebug package has not been fully reliable in it's 3.3.x versions, with some users encountering crashs/coredumps.

We could downgrade to 3.2.x by using pecl

Latest email from xdebug project acknowledges these problems

Actual Behavior

x

Steps To Reproduce

No response

Anything else?

No response

rfay commented 1 month ago

Stack Overflow similar approach, https://stackoverflow.com/questions/77582344/how-can-i-install-xdebug-on-ddev-for-php-8-3-before-its-ready-in-a-release/77582345#77582345

nickchomey commented 4 days ago

I understand why this was done. But is there a way that we can easily opt-in to the latest version of Xdebug? I just moved to DDEV and am missing the new flame graph profiling.

rfay commented 4 days ago

You already have the new version if you select PHP 8.3 in DDEV (Xdebug 3.3 is only one available). So ddev config --php-version=8.3 and you have it.

You can also just install the new version for any other currently supported PHP version, put this in your .ddev/config.yaml:

webimage_extra_packages: ['php${DDEV_PHP_VERSION}-xdebug']

Test with ddev restart && ddev xdebug on && ddev php --version

Finally, you may want to try out the impressive xhgui/xhprof profiling found in https://github.com/ddev/ddev-xhgui

nickchomey commented 4 days ago

Thank you very much! That makes sense - I'm just getting my bearings with ddev, so didn't know which knobs to reach for.