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

后端 未结 9 1989
时光取名叫无心
时光取名叫无心 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:36

    You can run Xdebug from the command line by setting an environment variable beforehand, e.g.:

    export XDEBUG_CONFIG="idekey=YOUR_IDE_KEY remote_host=localhost remote_enable=1"

    This worked for me.

    More information on the Xdebug documentation.

提交回复
热议问题