Loading

ubuntu 16.04 vscode + php debug

1.vscode 安装PHP Debug扩展;
2.php环境配置:
1.安装xdebug扩展:

  sudo apt-get install php-xdebug

    2.找到扩展的路径:
    chq@chq-Ubuntu:/usr/bin$ find /usr/ -name "xdebug.so"
    /usr/lib/php/20151012/xdebug.so

    3.编辑php.ini文件,末尾加入,保存退出:
    chq@chq-Ubuntu:/usr/bin$ find /usr/ -name "xdebug.so"
    /usr/lib/php/20151012/xdebug.so
    在php.ini后面补充:

[xdebug]
zend_extension="/usr/lib/php/20151012/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_autostart = 1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000

posted @ 2018-01-25 10:12  集君  阅读(730)  评论(0编辑  收藏  举报