Debugging php-cli scripts with xdebug and netbeans?

前端 未结 7 1114
闹比i
闹比i 2021-01-29 19:40

I have managed to initiate php-cli script debug session from the IDE itself, but I need to start the debugging session from the shell / command line. These are rather complex ma

7条回答
  •  长发绾君心
    2021-01-29 20:33

    I will put all together, the following is that works for me.

    file:
    /etc/php5/cli/php.ini
    
    zend_extension="/usr/lib/php5/20121212/xdebug.so" -> xdebug bin path
    xdebug.remote_enable=on
    xdebug.remote_host=127.0.0.1
    xdebug.remote_handler="dbgp"
    xdebug.remote_mode="req"
    xdebug.remote_port=9000 -> same port configured in netbeans debugging tab
    xdebug.idekey="netbeans-xdebug" -> same ide configured in netbeans debuggin tab
    xdebug.remote_autostart=1
    

    then, without any other parameter

    php script.php

提交回复
热议问题