php-profiler
php-profiler copied to clipboard
Add example for profiler.enable with xdebug profiling enabled
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
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
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"