XAMPP PHP配置 Xdebug

XAMPP自带 Xdebug工具,所以就不需要重新安装。可以直接配置使用。

  

  • 先下载对应版本的Xdebug 扩展文件,放到php ext 目录下
  • XdebugPHP根目录,打开PHP.ini文件
  • 找到[XDebug] 的部分,写入下面的配置信息:

    [XDebug]

    ;; Only Zend OR (!) XDebug

    zend_extension=php_xdebug-2.5.5-7.1-vc14.dll

    ;启用性能检测分析

    xdebug.profiler_enable=on

    ;启用代码自动跟踪

    xdebug.auto_trace=on

    ;允许收集传递给函数的参数变量

    xdebug.collect_params=on

    ;允许收集函数调用的返回值

    xdebug.collect_return=on

    ;指定堆栈跟踪文件的存放目录

    xdebug.trace_output_dir="C:/software/xampp/php/debug"

    ;指定性能分析文件的存放目录

    xdebug.profiler_output_dir="C:/software/xampp/php/debug"

    xdebug.profiler_output_name = cachegrind.out.%t.%p 

    xdebug.remote_enable=1
    xdebug.remote_handler=dbgp
    xdebug.remote_port=9000
    xdebug.remote_connect_back=1
    xdebug.remote_autostart=0  

    顺便一提的是,我遇到了一个坑,那就是当我下载的是64位扩展的时候,发现根本没法使用。只有下载了32位的线程安全版本,才生效。。。。

    所以还是要注意的,我一直以为我使用的php64位的。。。固定思维害死人啊


  • 配置成功后的界面:

      

猜你喜欢

转载自blog.csdn.net/shikenian520/article/details/78647753