I\'ve tried running the following CLI command:
phpunit -d xdebug.profiler_enable=on XYZTestCase.php
but it just runs as normal. Can anyone
The xdebug.profiler_enable
setting can't be changed at runtime but only at the start of script.
Running phpunit -d foo=bar
will just lead to phpunit calling ini_set("foo", "bar");
and that doesn't work since the value can't change at runtime.
See: xdebug.profiler_enable
Enables Xdebug's profiler which creates files in the profile output directory. Those files can be read by KCacheGrind to visualize your data. This setting can not be set in your script with ini_set(). If you want to selectively enable the profiler, please set xdebug.profiler_enable_trigger to 1 instead of using this setting.
php -d xdebug.profiler_enable=on /usr/bin/phpunit XYZTestCase.php
By applying the setting directly to the PHP runtime and not phpunit it will be set before the script starts and should work.