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条)

报告相同问题?

悬赏问题

  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来
  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效
  • ¥15 悬赏!微信开发者工具报错,求帮改