Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/241.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 所以eclipse和xdebug走进一个酒吧,然后我的apache服务器就死了_Php_Eclipse_Apache_Debugging_Xdebug - Fatal编程技术网

Php 所以eclipse和xdebug走进一个酒吧,然后我的apache服务器就死了

Php 所以eclipse和xdebug走进一个酒吧,然后我的apache服务器就死了,php,eclipse,apache,debugging,xdebug,Php,Eclipse,Apache,Debugging,Xdebug,我正在使用WindowsXPx86、wamp、apache2、PHP5.3x86、EclipsePHP和xdebug,它们作为虚拟主机和https虚拟主机在本地主机上运行 eclipse版本信息 面向PHP开发人员的Eclipse 版本:Helios发行版 构建id:20100617-1415 不知何故,我成功地设置了eclipse和xdebug,一切都很好 然后我不得不在我的项目中建立一个svn分支,用2个新的虚拟主机重新配置apache,并更新我的windows主机文件 现在,当我在ecli

我正在使用WindowsXPx86、wamp、apache2、PHP5.3x86、EclipsePHP和xdebug,它们作为虚拟主机和https虚拟主机在本地主机上运行

eclipse版本信息
面向PHP开发人员的Eclipse 版本:Helios发行版 构建id:20100617-1415

不知何故,我成功地设置了eclipse和xdebug,一切都很好

然后我不得不在我的项目中建立一个svn分支,用2个新的虚拟主机重新配置apache,并更新我的windows主机文件

现在,当我在eclipse中启动调试模式时,一切都会消失

具体来说,, 如果我没有设置断点,应用程序运行正常,除了我首先要调试的问题

如果我设置了一个断点,那么应用程序将在断点处停止,eclipse似乎正在掌控局面。但是现在,当我按下continue、step-over、step-into或sneeve时,eclipse告诉我执行已经恢复,但应用程序仍然挂起,我必须重新启动apache

我怀疑eclipse和xdebug之间的通信出现了一些中断,因为在我看来,eclipse似乎正在发送continue或step-over命令,但xdebug没有接收到它

但即使是这样,我也不知道该怎么办。我应该去哪里

更新:
我已经成功地使用notepad++及其xdebug插件进行了调试,并且像穴居人一样,在url中键入&xdebug\u SESSION\u START=SESSION\u名称。然而,尽管我喜欢npp,它的调试插件还是有很多缺陷

因此,我注意到stackoverflow上有一则名为“phpstorm”的广告,该广告声称是一个轻量级但功能齐全的php ide,支持原生xdebug。演示需要重新启动才能使其工作,感觉有点像在一个不稳定的草稿表上工作,但它很好地调试了我的小测试应用程序和真实应用程序,这超出了我目前对eclipse的理解,尽管这可能是我的错

我可能应该早点发布这篇文章:/这是我的phpinfo()xdebug部分

xdebug
xdebug support  enabled
Version     2.1.0

Supported protocols Revision
DBGp - Common DeBuGger Protocol     $Revision: 1.145 $

Directive   Local Value Master Value
xdebug.auto_trace   Off Off
xdebug.collect_assignments  Off Off
xdebug.collect_includes On  On
xdebug.collect_params   0   0
xdebug.collect_return   Off Off
xdebug.collect_vars Off Off
xdebug.default_enable   On  On
xdebug.dump.COOKIE  no value    no value
xdebug.dump.ENV no value    no value
xdebug.dump.FILES   no value    no value
xdebug.dump.GET no value    no value
xdebug.dump.POST    no value    no value
xdebug.dump.REQUEST no value    no value
xdebug.dump.SERVER  no value    no value
xdebug.dump.SESSION no value    no value
xdebug.dump_globals On  On
xdebug.dump_once    On  On
xdebug.dump_undefined   Off Off
xdebug.extended_info    On  On
xdebug.file_link_format no value    no value
xdebug.idekey   no value    no value
xdebug.manual_url   http://www.php.net  http://www.php.net
xdebug.max_nesting_level    100 100
xdebug.overload_var_dump    On  On
xdebug.profiler_aggregate   Off Off
xdebug.profiler_append  Off Off
xdebug.profiler_enable  Off Off
xdebug.profiler_enable_trigger  Off Off
xdebug.profiler_output_dir  C:\xampp\tmp    C:\xampp\tmp
xdebug.profiler_output_name xdebug_profile.%p   xdebug_profile.%p
xdebug.remote_autostart Off Off
xdebug.remote_connect_back  Off Off
xdebug.remote_cookie_expire_time    3600    3600
xdebug.remote_enable    On  On
xdebug.remote_handler   dbgp    dbgp
xdebug.remote_host  localhost   localhost
xdebug.remote_log   c:\xampp\apache\logs\xdebug.log c:\xampp\apache\logs\xdebug.log
xdebug.remote_mode  req req
xdebug.remote_port  9000    9000
xdebug.scream   Off Off
xdebug.show_exception_trace Off Off
xdebug.show_local_vars  Off Off
xdebug.show_mem_delta   Off Off
xdebug.trace_format 0   0
xdebug.trace_options    0   0
xdebug.trace_output_dir C:\xampp\tmp    C:\xampp\tmp
xdebug.trace_output_name    trace.%c    trace.%c
xdebug.var_displ

 ay_max_children    128 128
 xdebug.var_display_max_data    512 512
 xdebug.var_display_max_depth   3   3
下面是我在 重现问题

日志于2011-01-03 08:56:22打开 -> ==已到达断点,执行暂停。在eclipse中,我单击“步骤” 结束“ 听起来很有希望

从外观上看,XDebug和Eclipse(在其php开发环境中)都可以使用DBGp协议。基于这篇文章,您可以通过修改Apache的.htaccess文件或运行DBGp代理(不管是什么)来让事情正常进行。本文将提供更多详细信息

我怀疑XDebug和Eclipse都连接到同一个PHP调试会话,相互踩着对方的脚,引起了欢笑


那个或“未定义的行为”。无论如何。

这听起来可能是个愚蠢的问题,如果是这样,我很抱歉,但是您是否在Eclipse调试配置中创建了一个新的PHP服务器,并映射到新的虚拟主机

每次创建一个新的vhost时,我通常会创建一个全新的调试配置,并在该配置中创建一个映射到vhost的新PHP服务器,以便在启动新会话时可以轻松地从Debug Configs下拉列表中选择它

如果有人想知道,我可以通过运行->“调试配置…”,从左边的菜单中选择“PHP网页”,单击“新建+”(如果我已经有了,则单击“复制”),然后在“服务器”选项卡下,即“PHP服务器”,单击“新建”,然后键入文档根目录的vhost的URL。

woooooooo

创建一个新的工作区可以让我成功地调试

现在,我对造成这种情况的最好猜测是,在同一个工作区中有两个项目,在同一个ip上有不同的vhost

所以我不会再那样做了

现在,我对造成这种情况的最好猜测是,在同一个工作区中有两个项目,在同一个ip上有不同的vhost

我也在调试两个项目,在同一个Eclipse工作区中,在同一个IP上使用不同的vhost,并使用apache

我没有遇到你的问题

虽然我的apache和其他东西位于debian的vmware仿真中,而我的Eclipse位于WinXP中

最好的


Raffael

我真的帮不上忙,但我在xdebug随机崩溃eclipse/恢复时遇到了类似的问题。这仍然时不时发生,但我不知道为什么。我很想知道答案。哦,还有+1作为令人耳目一新的幽默:D+1作为标题,如果有人编辑它,请让我知道,我会为您还原它(或者让它还原为
;)
)~~至于实际问题,idk,但听起来您知道断点在哪里(eclipse和xdebug之间)。。。我不使用eclipse/apache,因此我无法帮助您,但祝您好运。我不喜欢PHPStorm。我发现它笨重不堪,无法使用。2.您使用的是32位还是64位Eclipse,以及哪个版本?32位或64位PHP,哪个版本?我想您已经尝试过将PHP/XDebug设置重置为默认值并从头开始配置了?如果您这样做了,那么至少您可以确定引起问题的不是您的XDebug配置。然后尝试重置Apache主机设置,只将活动程序添加为虚拟主机,调试您的程序,然后稍后添加其他程序(取决于您运行了多少其他程序,以及在执行此操作时延长停机时间是否可行)。同样,尝试创建一个与您的程序关联的新Eclipse项目,并在debug中运行它,以查看是否是Eclipse的settings.xdebug在Windows上使用curl PHP扩展时遇到问题。如果启用了它,请尝试禁用它以查看是否有帮助。xdebug和ide不应该连接到同一个调试会话吗?如果不是,是否有一种简单的方法来测试这种情况?我不认为这是多客户端问题,因为我可以与其他调试程序连接。我猜。当然,请尝试禁用PHP
Log opened at 2011-01-03 08:56:22
-> <init xmlns="urn:debugger_protocol_v1"
xmlns:xdebug="http://xdebug.org/dbgp/xdebug"
fileuri="file:///C:/xampp/htdocs/lab/zf-tutorial/public/index.php"
language="PHP" protocol_version="1.0"
appid="4404"
idekey="ECLIPSE_DBGP"><engine
version="2.1.0"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick
Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright
(c) 2002-2010 by Derick
Rethans]]></copyright></init>

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

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

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

<- feature_get -i 36 -n encoding
-> <response xmlns="urn:debugger_protocol_v1"
xmlns:xdebug="http://xdebug.org/dbgp/xdebug"
command="feature_get"
transaction_id="36"
feature_name="encoding"
supported="1"><![CDATA[iso-8859-1]]></response>

<- feature_get -i 37 -n supports_async
-> <response xmlns="urn:debugger_protocol_v1"
xmlns:xdebug="http://xdebug.org/dbgp/xdebug"
command="feature_get"
transaction_id="37"
feature_name="supports_async"
supported="1"><![CDATA[0]]></response>

<- stdout -i 38 -c 1
-> <response xmlns="urn:debugger_protocol_v1"
xmlns:xdebug="http://xdebug.org/dbgp/xdebug"
command="stdout" transaction_id="38"
success="1"></response>

<- stderr -i 39 -c 1
-> <response xmlns="urn:debugger_protocol_v1"
xmlns:xdebug="http://xdebug.org/dbgp/xdebug"
command="stderr" transaction_id="39"
success="0"></response>

<- breakpoint_set -i 40 -t line -f
file:///C:%5Cxampp%5Chtdocs%5Clab%5Czf-tutorial%5Cpublic%5Cindex.php
-n 21
-> <response xmlns="urn:debugger_protocol_v1"
xmlns:xdebug="http://xdebug.org/dbgp/xdebug"
command="breakpoint_set"
transaction_id="40"
id="44040001"></response>

<- run -i 41
-> <response xmlns="urn:debugger_protocol_v1"
xmlns:xdebug="http://xdebug.org/dbgp/xdebug"
command="run" transaction_id="41"
status="break"
reason="ok"><xdebug:message
filename="file:///C:/xampp/htdocs/lab/zf-tutorial/public/index.php"
lineno="21"></xdebug:message></response>

<- stack_get -i 42
-> <response xmlns="urn:debugger_protocol_v1"
xmlns:xdebug="http://xdebug.org/dbgp/xdebug"
command="stack_get"
transaction_id="42"><stack
where="{main}" level="0" type="file"
filename="file:///C:/xampp/htdocs/lab/zf-tutorial/public/index.php"
lineno="21"></stack></response>

<- stack_get -i 43
-> <response xmlns="urn:debugger_protocol_v1"
xmlns:xdebug="http://xdebug.org/dbgp/xdebug"
command="stack_get"
transaction_id="43"><stack
where="{main}" level="0" type="file"
filename="file:///C:/xampp/htdocs/lab/zf-tutorial/public/index.php"
lineno="21"></stack></response>

<- eval -i 44 --
JHRoaXMtPmZpZWxkc1snYm9vbF9jb21wbGV0ZSdd
-> <response xmlns="urn:debugger_protocol_v1"
xmlns:xdebug="http://xdebug.org/dbgp/xdebug"
command="eval"
transaction_id="44"><property
address="92404284"
type="bool"><![CDATA[-1]]></property></response>

<- eval -i 45 --
JHRoaXMtPnN0YWdlLT5nZXQoJ2Jvb2xfY29tcGxldGUnKQ==
-> <response xmlns="urn:debugger_protocol_v1"
xmlns:xdebug="http://xdebug.org/dbgp/xdebug"
command="eval"
transaction_id="45"><property
address="92404284"
type="bool"><![CDATA[-1]]></property></response>

<- eval -i 46 --
JHRoaXMtPmZpZWxkc1snYm9vbF9jb21wbGV0ZSdd
-> <response xmlns="urn:debugger_protocol_v1"
xmlns:xdebug="http://xdebug.org/dbgp/xdebug"
command="eval"
transaction_id="46"><property
address="92404284"
type="bool"><![CDATA[-1]]></property></response>

<- eval -i 47 --
JHRoaXMtPnN0YWdlLT5nZXQoJ2Jvb2xfY29tcGxldGUnKQ==
-> <response xmlns="urn:debugger_protocol_v1"
xmlns:xdebug="http://xdebug.org/dbgp/xdebug"
command="eval"
transaction_id="47"><property
address="92404284"
type="bool"><![CDATA[-1]]></property></response>

=== breakpoint reached, execution pauses.  In eclipse I click "step
over"

<- step_over -i 48

=== end of log