当前位置:Gxlcms > PHP教程 > vdebug+xdebug安装

vdebug+xdebug安装

时间:2021-07-01 10:21:17 帮助过:9人阅读

从eclipse到vim,一开始没有找到单步断点调试的功能,很不爽,然后搜索了下,找到了xdebug+vdebug的解决方案。

安装xdebug

环境:centos 6.5
xdebug的安装:
http://www.cnblogs.com/yixiong/archive/2013/03/29/2988331.html

vim上使用xdebug进行调试

  • 安装xdebug
  • 使用pathgen安装vim的vdebug插件。
  • 在php.ini中进行vdebug的配置。配置如下:
zend_extension=/path/to/xdebug.so
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
  • 注意事项:
    1. xdebug.remote_port要配置的是php-fpm所对应的端口。
    2. xdebug.remote_host:要配置的也是php-fpm所对应监听的ip地址,一般都是localhost(127.0.01);
    3. 配置完之后重启php-fpm

vdebug的使用

  • f5开启调试模式
  • f6关闭调试模式
  • Breakpoint加断点
  • f2 下一行
  • f3 进入函数
  • f4 退出函数
  • :VdebugEval $val 查看变量的运行值。

vdebug+xdebug所提供的功能

  • 断点调试,能够让我们深入到函数里面。
  • 提供出错的跟踪的信息。类似java那样。

vdebug官方文档:https://github.com/joonty/vdebug

').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i <= lines; i++) { $numbering.append($('
  • ').text(i)); }; $numbering.fadeIn(1700); }); });

    以上就介绍了vdebug+xdebug安装,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

  • 人气教程排行