Check if xdebug is working

后端 未结 8 2083
暗喜
暗喜 2020-12-04 16:31

Without installing a texteditor or an IDE, is it possible to test if xdebug is working, i.e. if it can debug php code?

The only part xdebug comes up in phpinfo() is

8条回答
  •  渐次进展
    2020-12-04 17:10

    Run

    php -m -c
    

    in your terminal, and then look for [Zend Modules]. It should be somewhere there if it is loaded!

    NB

    If you're using Ubuntu, it may not show up here because you need to add the xdebug settings from /etc/php5/apache2/php.ini into /etc/php5/cli/php.ini. Mine are

    [xdebug]
    zend_extension = /usr/lib/php5/20121212/xdebug.so
    xdebug.remote_enable=on
    xdebug.remote_handler=dbgp
    xdebug.remote_mode=req
    xdebug.remote_host=localhost
    xdebug.remote_port=9000
    

提交回复
热议问题