How to trigger XDebug profiler for a command line PHP script?

后端 未结 8 1490
太阳男子
太阳男子 2020-12-04 04:48

XDebug offers the configuration directive \"xdebug.profiler_enable_trigger\" that allows to activate profiling by passing the GET or POST parameter \"XDEBUG_PROFILE\" when c

8条回答
  •  囚心锁ツ
    2020-12-04 05:43

    with PhpStorm on remote webserver i use this command:

    XDEBUG_CONFIG="idekey=PHPSTORM" PHP_IDE_CONFIG="serverName=server_name" php -dxdebug.remote_host=`echo $SSH_CLIENT | cut -d "=" -f 2 | awk '{print $1}'` myscript.php
    

    where server_name stands for name of the server in PhpStorm project conifuguration

提交回复
热议问题