zoukankan      html  css  js  c++  java
  • phpstrom+xdebug+Xdebug helper 调试php

    第一步,php.ini打开xdebug扩展

    xdebug.remote_enable=on
    ; 此地址为IDE所在IP
    xdebug.remote_host=127.0.0.1
    xdebug.remote_port=19000
    ; 可以是任意Key,这里设定为PHPSTORM
    xdebug.idekey="PhpStorm"

    第二步设置phpstrom

    File>Settings,PHP | Debug,在Xdebug标签框内,根据服务器端的Xdebug端口,配置Debug port。

    第三步

    在google浏览器安装chrome扩展 Xdebug helper

    进入 Xdebug hepler 的配置选项中,选择 IDE key 为 PHPStorm

    点击地址栏的小虫子把扩展调整为 debug 模式

    第四步

    依次打开 PHPStorm 中的 Run>Start Listening for PHP Debug Connections

    另外针对框架/项目的调试方式需要在以上配置基础上,再进行一些配置:

    1.点击菜单里的 Run – Edit Configurations选项。

    2.点击 “添加” 按钮,选择 PHP Web Application,并在右侧输入配置名称,选择我们刚刚添加的 Server,Start URL 中填写调试可能所需的查询字符串,选择好默认浏览器,最后点击 Apply 和 OK,确认配置。

    在程序中设置好断点;
    在工具栏中,选择好要调试的应用;
    点击 Start Listening for PHP Debug Connections 按钮,即那个红色的电话按钮,让其变成绿色,即开始监听 PHP Debug 连接;
    于是,终于可以开始了。
    点击上图中的 Debug 按钮,或者从菜单中选择 Run – Debug,你就开始了 Debug 之旅…

  • 相关阅读:
    LintCode "Maximum Gap"
    LintCode "Wood Cut"
    LintCode "Expression Evaluation"
    LintCode "Find Peak Element II"
    LintCode "Remove Node in Binary Search Tree"
    LintCode "Delete Digits"
    LintCode "Binary Representation"
    LeetCode "Game of Life"
    LintCode "Coins in a Line"
    LintCode "Word Break"
  • 原文地址:https://www.cnblogs.com/whlives/p/4371625.html
Copyright © 2011-2022 走看看