Xdebug 2.1.0、XAMPP 1.7.3、Win7 32 位的问题
寻求一些帮助来让 xdebug 适应我的设置。我的目标是能够调试 Joomla 代码。
首先,我先说一下,大约一年前,我获得了一个 xdebug 版本,可以在 Vista 32 位下使用 xampp 与 Eclipse PDT 2.1 一起使用。然而,现在我在一台新机器上,我想让一切都可以使用最新版本。我是按照此演练来完成此操作的。现在,尝试做同样的事情我无法让它发挥作用。
首先,根据演练,我下载了 php_xdebug-2.0.0-5.2.2.dll。很快意识到我需要 php 5.3 的 xdebug。因此,我找到了 xdebugs 定制安装说明并按照该说明进行操作。我的 php.ini 部分如下所示:
[XDebug]
;; Only Zend OR (!) XDebug
zend_extension = "D:\xampp\php\ext\php_xdebug-2.1.0-5.3-vc6.dll"
xdebug.remote_enable=true
xdebug.remote_host=localhost
xdebug.remote_port=10000
xdebug.remote_handler=dbgp
xdebug.profiler_enable=1
xdebug.profiler_output_dir="D:\xampp\tmp"
因此,这使得 xdebug 实际上显示在 phpinfo() 中。但是,在 Eclipse 中,当我调试为 Php 网页时,它首先似乎已连接,但是如果我单步执行到下一行代码,调试器只是坐在那里说它正在无限期地单步执行。有时apache会崩溃。我尝试了端口9000和10000,但没有成功。
我发现,如果我使用 XAMPP 1.7.3 附带的 php_xdebug.dll,我实际上可以毫无问题地连接和单步执行,除了该版本的 xdebug 显然有一个重大错误,导致我的所有问题变量被列为“未初始化”。所以它基本上没什么用,但是,它确实给了我一些希望,让我正确设置其中一些东西。
因此,我当前的设置是:Win7 32位、XAMPP 1.7.3(PHP 5.3.1、Apache 2.2.14)、Eclipse PDT 2.2
我对这里基本上所有工具的经验非常有限,所以我有点不知所措去做。任何帮助将不胜感激。我在这里搜索了一些具有类似问题的其他帖子,但其中大多数似乎都是针对这些组件的旧版本。
Looking for some help with getting xdebug to behave with my setup. My goal is to be able to debug Joomla code.
First let me preface saying that about a year ago I was able to get a version xdebug to work with Eclipse PDT 2.1 with xampp under Vista 32bit. However, now I'm on a new machine, and I wanted to get everything working with the latest versions. I did so by following through this walk-through. Now, trying to do the same thing I can't get it to work.
First, as per the walk-through, I downloaded php_xdebug-2.0.0-5.2.2.dll. Quickly realized that I needed an xdebug for php 5.3. So, I found the xdebugs Tailored Installation Instructions and followed that. My php.ini section looks as thus:
[XDebug]
;; Only Zend OR (!) XDebug
zend_extension = "D:\xampp\php\ext\php_xdebug-2.1.0-5.3-vc6.dll"
xdebug.remote_enable=true
xdebug.remote_host=localhost
xdebug.remote_port=10000
xdebug.remote_handler=dbgp
xdebug.profiler_enable=1
xdebug.profiler_output_dir="D:\xampp\tmp"
So this got the xdebug to actually show up in the phpinfo(). But, in Eclipse when I Debug As Php Webpage, it at first appears to connect, however if I step to the next line of code the debugger just sits there saying it is stepping, indefinitely. Sometimes apache will crash. I tried ports 9000, and 10000 with no avail.
What I did find out is, if I use the the php_xdebug.dll that comes with XAMPP 1.7.3, I actually can connect and step without any issues, EXCEPT, that version of xdebug apparently has a major bug in it that causes all my variables to be listed as 'Uninitialized'. So it is basically useless, however, it does give some hope that I have some of this stuff set up correctly.
So, my current setup thus: Win7 32bit, XAMPP 1.7.3 (PHP 5.3.1, Apache 2.2.14), Eclipse PDT 2.2
I have very limited experience with basically all the tools here so I'm kinda at a loss of what to do. Any help would be greatly appreciated. I searched some of the other posts here with similar issue but most of them appear to be for older versions of these components.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你的报告有些令人困惑。据我了解,一旦替换 XDebug-dll,您的设置就会起作用。那么你的(主要)问题就不可能与你的设置有关,当然,只要你还调整了 zend_extension 。
虽然 xdebug.remote_port=10000 看起来很奇怪。标准为 9000。如果您使用 9000,则必须在 Window/Preferences/PHP/Debug/Debuggers 中告诉 Eclipse 也侦听该端口以进行 XDebug。
最佳
拉斐尔
your report is somewhat confusing. As far as I understand you, your setup works as soon as you replace the XDebug-dll. Then your (primary) problem cannot be related to your settings, as far as you also adjusted zend_extension, of course.
Though xdebug.remote_port=10000 seems odd. Std is 9000. If you use 9000, the you have to tell Eclipse in Window/Preferences/PHP/Debug/Debuggers to also listen to that port for XDebug.
Best
Raffael