I\'ve tried running the following CLI command:
phpunit -d xdebug.profiler_enable=on XYZTestCase.php
but it just runs as normal. Can anyone
First, my environment:
php.ini:
[xdebug]
zend_extension ="c:/wamp64/bin/php/php7.1.16/zend_ext/php_xdebug-2.6.0-7.1-vc14-x86_64.dll"
xdebug.remote_enable = 1
xdebug.remote_autostart = 1
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 1
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir ="c:/wamp64/tmp"
xdebug.show_local_vars=0
xdebug.idekey = "PHPSTORM" #seems to work without this too
phpunit.xml:
./tests
./app
I made a test run configuration on phpstorm like this:
After making run configuration, the below command was run when I clicked debug button in PHPSTORM.
C:\wamp64\bin\php\php7.1.16\php.exe
-dzend_extension=C:\wamp64\bin\php\php7.1.16\zend_ext\php_xdebug-2.6.0-7.1-vc14-x86_64.dll
-dxdebug.remote_enable=1 -dxdebug.remote_mode=req -dxdebug.remote_port=9000 -dxdebug.remote_host=127.0.0.1 C:/wamp64/www//vendor/phpunit/phpunit/phpunit --bootstrap C:\wamp64\www\\vendor\autoload.php --configuration C:\wamp64\www\\phpunit.xml --teamcity
Please notice the --teamcity. I have no idea about it :) Also notice the back and forward slashes.
I hope this helps everyone.