How can I get XDebug to run with PHPUnit on the CLI?

后端 未结 9 1986
时光取名叫无心
时光取名叫无心 2020-12-23 11:01

I\'ve tried running the following CLI command:

phpunit -d xdebug.profiler_enable=on XYZTestCase.php

but it just runs as normal. Can anyone

9条回答
  •  庸人自扰
    2020-12-23 11:37

    Did you try to :

    1. Set your xdebug.idekey in your php.ini to wathever you want (eg: blacktie)
    2. restart your server

    3. Call you script by adding -d xdebug.idekey=blacktie

      phpunit -d xdebug.profiler_enable=on -d xdebug.idekey=blacktie XYZTestCase.php

    Hope that help.

提交回复
热议问题