dongsaohu6429 2017-05-15 17:32
浏览 89
已采纳

Eclipse和NetBeans PHP Xdebug会话永远不会完成

I am using UniServer Zero XIII with PHP 7.1. From the phpinfo.php file, I can see that xdebug enabled:

enter image description here

When I try to debug the source code and use a breakpoint on NetBeans, the XDebug session never completed:

enter image description here

When I go to see the execution of the web application from the web browser, it keeps trying to load the page, but it never completes.

I experience the same on Eclipse:

enter image description here

I am trying to understand why the Xdebug session never completes, and what I need to do to fix it. Thank you.

  • 写回答

2条回答 默认 最新

  • douzai9405 2017-05-31 14:44
    关注

    I ran out of time to find a solution to this problem. Unfortunately, I only received one answer to this question, and it did not solve my problem. I had to purchase a Zend Studio Perpetual license for Zend Studio 13.6, and now I can use breakpoints, debug my code using Zend Debugger (the competitor of XDebug), and everything works correctly.

    I tried as much as I could to fix the problem I experienced with XDebug on both NetBeans and Eclipse, but I ran out of time and I needed to move on. I had to pay $89 for my Zend Studio Perpetual license, which includes free upgrades for one year. I wanted to save money by using Eclipse or NetBeans, but this XDebug issue forced me to move from an open source to a proprietary solution in this case.

    Edited on August 29th, 2017:

    I finally have XDebug working on Zend Studio. I could not quickly configure Zend Debugger on UniServer Zero XIII, so I did the modifications that I am showing below, to the following file: C:[my path]\UniformServer13_3_2_ZeroXIII\UniServerZ\core\php71\php_production.ini:

    [xdebug]
    #zend_extension=${US_ROOTF}/core/php71/extensions/php_xdebug.dll
    zend_extension="C:\[my path]\UniformServer13_3_2_ZeroXIII\UniServerZ\core\php71\extensions\php_xdebug.dll"
    xdebug.remote_autostart=on
    xdebug.remote_enable=on
    xdebug.remote_host=127.0.0.1
    #xdebug.remote_port=9000
    xdebug.remote_port=9001
    xdebug.remote_handler=dbgp
    xdebug.remote_mode=req
    xdebug.idekey=default
    

    I changed the port from 9000 to 9001, and used an absolute path with double quotes to the zend_extension to specify where the php_xdebug.dll extension is located. I am not sure if this last step made any difference, or if only changing the port from 9000 to 9001 and then restarting Apache. But at least now I can configure breakpoints to stop the program there and see the values of variables I want to evaluate.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 MAX9296A+MAX96717,美信gmsl解串有人做过吗?
  • ¥15 求帮我解决一下inode 爆满的问题(有偿)
  • ¥15 关于#vscode#的问题:布料滤波算法中C++实现pcl在Vscode中pcl库没有#include <pcl>
  • ¥15 fpga:ov5640采集tft显示
  • ¥100 python怎么连接wxSQLite3加密的数据库
  • ¥20 创建taro项目,在vscode上能够写跨平台写微信小程序代码
  • ¥15 网站出现错误跳转问题
  • ¥15 Docker容器里已经安装了ssh,但打包迁移到新机器一直容器一直提示unrecognized service。
  • ¥15 综合布线实例设计,就好看好看不恐怖可好滤镜好聚
  • ¥15 使用moviepy库视频合并时出错