为什么我使用Atom从PHP Debug中获得“新会话被拒绝”

发布时间:2022-04-30 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了为什么我使用Atom从PHP Debug中获得“新会话被拒绝”脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
任何人都可以解释为什么我使用Atom从 PHP调试中获得“新会话被拒绝”?

我已经安装了xdebug并且apache认识到它已经安装,我正在使用扩展来启用Firefox的调试,但在Atom中我得到错误,有时我没有得到错误,但调试器仍然没有中断.我已经取消了Windows火墙作为一个问题,但现在我被卡住了.

这是我的PHP.ini中的设置:

;xdebug
zend_extension = C:\xampp\PHP\ext\PHP_xdebug-2.5.0rc1-5.6-vc11.dll
xdebug.remote_enable=on
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.idekey=atom-xdebug
xdebug.remote_autostart=off
xdebug.remote_LOG = C:\xampp\PHP\logs\xdebug.log

以下是config.cson中的设置:

"*":
  core:
    telemetryConsent: "limITed"
  editor:
    fontSize: 16
  "exception-reporting":
    userId: "8729c4aa-3989-14fa-78e9-968504643693"
  "PHP-debug":
    currentPanelMode: "bottom"
  welcome:
    showOnStartup: false
"PHP-debug":
  PathMaps: [
    "remotepath;localpath"
    "localhost:8080/rdportal/index.PHP;C:\\xampp\\htdocs\\rdportal"
  ]
  ServerPort: 9000

这是我得到的错误日志:

Log oPEned at 2016-12-01 03:43:41
I: Connecting to configured address/port: localhost:9001.
W: Creating socket for 'localhost:9001',WSAPoll: 10022.
W: Creating socket for 'localhost:9001',WSAPoll: 10022.
E: Could not connect to client. :-(
Log closed at 2016-12-01 03:43:41

基于错误日志,我发现xdebug 2.5 RC存在缺陷,因此我现在已降级到.dll文件的2.4.1版本,现在而不是“新会话被拒绝”我获得“会话启动” – 我已重置根据认值,端口返回到9000,但仍然没有断点.相反,错误日志现在包含:

Log opened at 2016-12-01 04:11:32
I: Connecting to configured address/port: 127.0.0.1:9000.
I: Connected to client. :-)
-> <init XMlns="urn:debugger_PRotocol_v1" xMLns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///C:/xampp/htdocs/rdportal/index.PHP" language="PHP" xdebug:language_version="5.6.1-dev" protocol_version="1.0" appid="6764" idekey="atom-xdebug"><engine version="2.4.1"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2016 by Derick Rethans]]></copyright></init>

<- feature_set -i 1 -n "show_hidden" -v 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="1" feature="show_hidden" success="1"></response>

<- feature_set -i 2 -n "max_depth" -v 4
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="2" feature="max_depth" success="1"></response>

<- feature_set -i 3 -n "max_data" -v 1024
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="3" feature="max_data" success="1"></response>

<- feature_set -i 4 -n "max_children" -v 32
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="4" feature="max_children" success="1"></response>

<- feature_set -i 5 -n "multiple_sessions" -v 0
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="5" feature="multiple_sessions" success="1"></response>

<- breakpoint_set -i 6 -t "line" -f "file://localhost:8080/rdportal/index.PHP/index.PHP" -n 134
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="6" id="67640073"></response>

<- breakpoint_set -i 7 -t "exception" -x "Fatal error"
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="7" id="67640074"></response>

<- breakpoint_set -i 8 -t "exception" -x "catchable Fatal error"
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="8" id="67640075"></response>

<- breakpoint_set -i 9 -t "exception" -x "Warning"
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="9" id="67640076"></response>

<- breakpoint_set -i 10 -t "exception" -x "Strict standards"
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="10" id="67640077"></response>

<- breakpoint_set -i 11 -t "exception" -x "Xdebug"
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="11" id="67640078"></response>

<- breakpoint_set -i 12 -t "exception" -x "UnkNown error"
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="12" id="67640079"></response>

<- breakpoint_set -i 13 -t "exception" -x "Notice"
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="13" id="67640080"></response>

<- run -i 14
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="run" transaction_id="14" status="stopping" reason="ok"></response>

<- stop -i 15
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stop" transaction_id="15" status="stopped" reason="ok"></response>

Log closed at 2016-12-01 04:11:32

这是现在的config.cson:

"*":
  core:
    telemetryConsent: "limited"
  editor:
    fontSize: 16
  "exception-reporting":
    userId: "8729c4aa-3989-14fa-78e9-968504643693"
  "PHP-debug":
    PathMaps: [
      "C:\\xampp\\htdocs\\rdportal;localhost:8080/rdportal/index.PHP"
    ]
    PHPException:
      CatchableFatalError: false
      Deprecated: false
      FatalError: false
      Notice: false
      ParseError: false
      StrictStandards: false
      UnkNownError: false
      Warning: false
      Xdebug: false
    currentPanelMode: "bottom"
  welcome:
    showOnStartup: false

这是PHP.ini的xdebug部分:

;xdebug
zend_extension = C:\xampp\PHP\ext\PHP_xdebug-2.4.1-5.6-vc11.dll
xdebug.remote_enable=1
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_autostart=0

解决方法

好的,所以我发现问题是我的路径图 – 它们是错误的方式.总而言之,2.5下载不可靠,路径图远程指的是本地文件,本地部分指的是网站文件…也许这是我的误解,但这对我来说似乎很奇怪!无论如何,问题已解决.

脚本宝典总结

以上是脚本宝典为你收集整理的为什么我使用Atom从PHP Debug中获得“新会话被拒绝”全部内容,希望文章能够帮你解决为什么我使用Atom从PHP Debug中获得“新会话被拒绝”所遇到的问题。

如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。