php-profiler icon indicating copy to clipboard operation
php-profiler copied to clipboard

Add example for profiler.enable with xdebug profiling enabled

Open glensc opened this issue 4 years ago • 2 comments

This adds an example to Detect XDebug triggers and skip profiling:

  • https://github.com/perftools/xhgui/issues/104

See https://github.com/perftools/xhgui/issues/104#issuecomment-54754662

glensc avatar Dec 19 '20 09:12 glensc

This needs to be validated first as xdebug_is_enabled() description in phpstorm stubs says "Return whether stack traces would be shown in case of an error or not"

  • https://github.com/JetBrains/phpstorm-stubs/blob/v2020.2/xdebug/xdebug.php#L129-L133

glensc avatar Dec 19 '20 09:12 glensc

Perhaps xdebug_info gives he accurate info:

➔ php -r "xdebug_info();"|grep -i xdebug.mode
xdebug.mode => develop => develop

which is just in value:

$ php -r 'var_dump(ini_get("xdebug.remote_autostart"));'
string(1) "0"

glensc avatar Dec 19 '20 09:12 glensc