Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP_TAG=8.3-dev doesn't work with Xdebug #204

Open
rahunak opened this issue Jul 24, 2024 · 2 comments
Open

PHP_TAG=8.3-dev doesn't work with Xdebug #204

rahunak opened this issue Jul 24, 2024 · 2 comments

Comments

@rahunak
Copy link

rahunak commented Jul 24, 2024

Fresh installed site with PHP_TAG=8.2-dev-4.43.6
from https://github.com/wodby/docker4drupal
in php container have output:
[email protected]:/var/www/html $ php -v
PHP 8.2.5 (cli) (built: Apr 14 2023 17:52:42) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.5, Copyright (c) Zend Technologies
with Zend OPcache v8.2.5, Copyright (c), by Zend Technologies
with Xdebug v3.2.0, Copyright (c) 2002-2022, by Derick Rethans

But when I switch php to PHP_TAG=8.3-dev-4.60.2
in php container have output:
[email protected]:/var/www/html $ php -v
PHP 8.3.9 (cli) (built: Jul 6 2024 01:11:01) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.9, Copyright (c) Zend Technologies
with Zend OPcache v8.3.9, Copyright (c), by Zend Technologies

In the new version no Xdebug, it's a problem.
Any help appreciated.

@csandanov
Copy link
Member

This is probably due to the change introduced in 4.47.0, we got rid of the confusingPHP_XDEBUG env var (#176).

So now by default xdebug disabled via the default value of PHP_EXTENSIONS_DISABLE='xdebug,xhprof,spx', if you need to enable xdebug you should override it (e.g. PHP_EXTENSIONS_DISABLE='xhprof,spx'). But maybe we should enable all extensions by default in the -dev variants 🤔

@frank-holub
Copy link

frank-holub commented Sep 12, 2024

Ran into a similar issue while testing things locally on a Drupal 10 site using wodby/php where Xdebug would not stop on breakpoints. We found this to not be tied to a specific PHP version but rather, as @csandanov said, to the wodby/php image version.

The above suggested resolution of swapping out PHP_XDEBUG: 1 for PHP_EXTENSIONS_DISABLE: 'xhprof,spx' worked for us.

+1 for the suggestion to enable all extensions by default for dev variants.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants