zoukankan      html  css  js  c++  java
  • PhpStorm配置xDebug

    php的调试环境的配置一向是比较纠结的,之前在zendstudio中配置了一次,破费周折(具体过程参见:http://blog.csdn.net/dannywj1371/article/details/9272565),今天在phpstorm上配置了一下,现记录一下详细过程。

    1.安装好phpstorm(版本7.1.3)。

    2.配置php的xdebug扩展组件。

    xdebug的安装成功与失败需要检验一下。有两种方式:

    a.在命令行中执行 php –m 没有报错并且可以找到xdebug模块。

    b.把phpinfo() 的信息粘贴在xdebug的向导页面中,分析成功。向导页面:http://xdebug.org/wizard.php

    安装方法:

    a.修改php.ini 添加配置:

    [XDebug]
    ; Only Zend OR (!) XDebug
    zend_extension_ts="E:xamppphpextphp_xdebug-2.2.3-5.2-vc9.dll"
    xdebug.auto_trace=On
    xdebug.collect_params=On
    xdebug.collect_return=On
    xdebug.trace_output_dir="e:/xampp/php/debuginfo"
    xdebug.profiler_enable=On
    xdebug.profiler_output_dir="e:/xampp/php/debuginfo"
    xdebug.idekey=PhpStorm
    xdebug.remote_enable=on
    xdebug.remote_host=localhost
    xdebug.remote_port=9000
    xdebug.remote_handler=dbgp

    由于在zend_extension_ts配置了dll的引用,因此

    ;extension=php_xdebug-2.2.3-5.2-vc9.dll 这个配置就可以注释掉了。否则提示重复加载xdebug

    PS具体xdebug的版本如果不一致,可以参考向导页面的报错信息,以及根据报错信息的建议方案进行调整。

    3.配置phpstorm

    image

    image

    此处的配置idekey要和php.ini中配置的一致。

    image

    加入断点后要点击监听xdebug按钮,才可调试。

    参考网站:

    http://www.cnblogs.com/jsn521/p/3399997.html
    http://www.cnblogs.com/tippoint/p/3429384.html
    http://micate.me/phpstorm-xdebug.note

  • 相关阅读:
    OSI模型白话
    并发
    初始化与清理
    多线程
    recyclerview Adapter
    recyclerview刷新
    surfaceview
    viewgroup绘制流程
    view配置
    项目遇到的问题
  • 原文地址:https://www.cnblogs.com/dannywang/p/3601095.html
Copyright © 2011-2022 走看看