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

后端 未结 8 1466
太阳男子
太阳男子 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:50

    Similar, but different process for getting it to work with Netbeans while developing on a VM.

    Need to pass in the remote enabled flag, the auto start flag, the ide flag, and the name of your remote host.

    php -dxdebug.remote_enable=1 -dxdebug.remote_autostart=On -dxdebug.idekey=netbeans-xdebug -dxdebug.remote_host=NAME.OF.HOST script.php
    
    0 讨论(0)
  • 2020-12-04 05:51

    You can pass INI settings with the -d flag: php -d xdebug.profiler_enable=On script.php.

    0 讨论(0)
提交回复
热议问题