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

Xdebug 3.0 with PHP 8.x #746

Closed
llaville opened this issue Nov 11, 2020 · 3 comments
Closed

Xdebug 3.0 with PHP 8.x #746

llaville opened this issue Nov 11, 2020 · 3 comments

Comments

@llaville
Copy link
Contributor

ISSUE TYPE

  • Feature request

SUMMARY

Update default configuration file into

and also

Goal

Use new directives explained in Upgrade Guide Xdebug 3.0 available at https://3.xdebug.org/docs/upgrade_guide

@llaville
Copy link
Contributor Author

llaville commented Dec 6, 2020

Xdebug 3.0 with PHP 7.x

@cytopia, I've just downloaded devilbox/php-fpm:7.2-work-0.120 image and try to apply xdebug config from php 8.0
https://github.com/cytopia/devilbox/blob/v1.8.3/cfg/php-ini-8.0/devilbox-php.ini-xdebug

but i've noticed that some configuration settings are wrong, because I've xdebug v3 rather than v2

PHP 7.2.34 (cli) (built: Nov 18 2020 11:19:28) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.34, Copyright (c) 1999-2018, by Zend Technologies
    with Xdebug v3.0.1, Copyright (c) 2002-2020, by Derick Rethans

Config settings related to xdebug upgrade guide at https://xdebug.org/docs/upgrade_guide,
we should have by default

xdebug.mode               = debug
xdebug.start_with_request = yes
xdebug.client_port        = 9003
xdebug.idekey             = PHPSTORM
xdebug.log                = /var/log/php/xdebug.log

Notice that URL of upgrade guide have changed since v3 is now stable
see https://github.com/cytopia/devilbox/blob/v1.8.3/cfg/php-ini-8.0/devilbox-php.ini-xdebug#L24

@llaville
Copy link
Contributor Author

llaville commented Dec 6, 2020

I've also a recommandation: if we wan't use the new xdebug v3, de-activate it because it consume lot of time.

See upgrade guide https://xdebug.org/docs/upgrade_guide

Besides setting the mode with xdebug.mode, you can also set the mode with the XDEBUG_MODE environment variable. If this environment variable is active, it overrides the mode as set through xdebug.mode.

On command line

export XDEBUG_MODE=off

php your-script.php

I've a batch process that run in 6 secs when xdebug v3 is off and took 1 minute when xdebug is on !

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

No branches or pull requests

2 participants