View Issue Details

IDProjectCategoryView StatusLast Update
0001926XdebugUncategorizedpublic2021-01-04 16:08
Reporterandreas.eisenmann Assigned Toderick  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version3.0.1 
Target Version3.0devFixed in Version3.0.2 
Summary0001926: Add Xdebug mode's source to xdebug_info() output
Description

After migrating from xdebug 2.x to 3.0 I am not able to use the profiler anymore. Step debugging works fine.

Content of my xdebug.ini:

xdebug.mode=profile
xdebug.start_with_request=trigger
xdebug.output_dir=/home/www/debug/xdebug/

The output dir is writable for www-data.

This output of \xdebug_info() confuses me:

Feature Enabled/Disabled Docs
Development Aids disabled
Coverage disabled
GC Stats disabled
Profiler disabled
Step Debugger enabled
Tracing disabled
....

Directive Local Value Master Value Docs
xdebug.mode profile profile
xdebug.start_with_request trigger trigger
...

So xdebug.mode is profile but the matrix with enabled/disabled features still says that the step debugger is enabled (and YES, it is, it still connects to my IDE), but the profiler not. From my understanding those values should correlate, or did I miss something?

Additional Information

www-data@php74:/$ php -v
PHP 7.4.13 (cli) (built: Nov 26 2020 07:50:18) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.13, Copyright (c), by Zend Technologies
with Xdebug v3.0.1, Copyright (c) 2002-2020, by Derick Rethans

PHP is running inside a docker container launched by docker-compose.

TagsNo tags attached.
Operating SystemDebian 9
PHP Version7.4.10-7.4.19

Activities

derick

2020-12-30 12:13

administrator   ~0005623

  • Do you perhaps have an XDEBUG_MODE environment variable exposed? You can check that with 'var_dump($_ENV);'

The information in xdebug_info()'s matrix is what Xdebug really sees, and beyond setting the xdebug.mode INI setting, the only way how this can be overridden is by the XDEBUG_MODE env variable. Sometimes IDEs do make that change in their run configurations.

andreas.eisenmann

2020-12-30 12:47

reporter   ~0005627

Thanks a lot, indeed there was a configuration I didn't know about in my docker environment which has defined XDEBUG_MODE. Now the profiler works as expected, thank you! :-)

Is there a possibility to give a hint in the xdebug_info() - maybe similar to "local value" and "master value" - to see that xdebug.mode has been overriden by this environment variable?

By the way: I really like XDebug 3 with the new info page and the improved logging, great work!

derick

2020-12-31 11:49

administrator   ~0005628

https://github.com/xdebug/xdebug/pull/715

derick

2020-12-31 12:46

administrator   ~0005629

I've added the source of the modes to xdebug_info() now.

Issue History

Date Modified Username Field Change
2020-12-30 08:35 andreas.eisenmann New Issue
2020-12-30 12:13 derick Assigned To => derick
2020-12-30 12:13 derick Status new => feedback
2020-12-30 12:13 derick Note Added: 0005623
2020-12-30 12:47 andreas.eisenmann Note Added: 0005627
2020-12-30 12:47 andreas.eisenmann Status feedback => assigned
2020-12-31 11:49 derick Note Added: 0005628
2020-12-31 11:49 derick Target Version => 3.0dev
2020-12-31 12:46 derick Status assigned => closed
2020-12-31 12:46 derick Resolution open => fixed
2020-12-31 12:46 derick Fixed in Version => 3.0.2
2020-12-31 12:46 derick Note Added: 0005629
2021-01-04 16:08 derick Summary xdebug.mode vs. enabled features => Add Xdebug mode's source to xdebug_info() output