XDebug 无法与 xampp 一起使用

发布于 2024-09-06 01:07:20 字数 1026 浏览 10 评论 0原文

我正在使用(或尝试)将捆绑的 XDebug 与 XAMPP 1.7.2 一起使用。它与 Apache 2.2.12、PHP 5.3.0、XDebug 2.0.5 和 Zend 捆绑在一起(不确定版本)

这是 XAMPP 的全新安装,是我添加到 php.ini 的唯一内容(位于 xampp/ php/php.ini) 是:(

zend_extension_ts = "C:\xampp\php\extensions\php_xdebug.dll"
[xdebug]
xdebug.auto_trace = 1
xdebug.collect_includes = 1
xdebug.collect_params = 1
xdebug.collect_return = 1
xdebug.default_enable = 1
xdebug.extended_info = 1
xdebug.show_local_vars = 0
xdebug.show_mem_delta = 1
xdebug.trace_format = 1
xdebug.trace_options = 0
xdebug.trace_output_dir ="C:\xampp\tmp"

xdebug.remote_enable=1
xdebug.remote_mode="req"
xdebug.remote_host=127.0.0.1
xdebug.remote_port=17869
xdebug.idekey=<idekey>

xdebug.remote_handler="gdb"
xdebug.auto_profile = 1
xdebug.auto_profile_mode = 2
xdebug.output_dir = "C:\xampp\tmp"

xdebug.dump.SERVER = REMOTE_ADDR,REQUEST_METHOD

这只是我尝试过的许多不同配置之一)

但是尽我所能,XDebug 只是不会连接到任何东西。我尝试过 Netbeans 和 Debugclient.exe (在 xampp/php/debugclient.exe 中)。他们俩只是永远坐着等待。

如何让 XDebug 工作?

I'm using (or trying to anyway) use the bundled XDebug with XAMPP 1.7.2. It comes bundled with Apache 2.2.12, PHP 5.3.0, XDebug 2.0.5 and Zend (not sure on version)

This is a totally fresh install of XAMPP, the only thing I've added to php.ini (at xampp/php/php.ini) is:

zend_extension_ts = "C:\xampp\php\extensions\php_xdebug.dll"
[xdebug]
xdebug.auto_trace = 1
xdebug.collect_includes = 1
xdebug.collect_params = 1
xdebug.collect_return = 1
xdebug.default_enable = 1
xdebug.extended_info = 1
xdebug.show_local_vars = 0
xdebug.show_mem_delta = 1
xdebug.trace_format = 1
xdebug.trace_options = 0
xdebug.trace_output_dir ="C:\xampp\tmp"

xdebug.remote_enable=1
xdebug.remote_mode="req"
xdebug.remote_host=127.0.0.1
xdebug.remote_port=17869
xdebug.idekey=<idekey>

xdebug.remote_handler="gdb"
xdebug.auto_profile = 1
xdebug.auto_profile_mode = 2
xdebug.output_dir = "C:\xampp\tmp"

xdebug.dump.SERVER = REMOTE_ADDR,REQUEST_METHOD

(this is only one of many different configs I've tried)

But try as I might, XDebug just will not connect to anything. I've tried Netbeans and Debugclient.exe (in xampp/php/debugclient.exe). They both just sit and wait forever.

How do I get XDebug to work?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

悲欢浪云 2024-09-13 01:07:21

我遇到过这样一种问题,我按照 xampp 1.7.2 的 xdebug 进行配置。无法工作。我刚刚将 zend_extension_ts 更改为 zend_extension。它对我有用。

I have faced such a type of problem where i configured as xdebug said for the xampp 1.7.2. Couldn't work. I just changed the zend_extension_ts to zend_extension. it works for me.

顾北清歌寒 2024-09-13 01:07:20

我的情况很烦人。除了一件意想不到的事情之外,一切都很好。 配置行

zend_extension = \xampp\php\ext\php_xdebug-2.2.5-5.5-vc11.dll

XDebug网站生成的 是错误的。我不得不更改为

zend_extension = php_xdebug-2.2.5-5.5-vc11.dll

希望如果将来有人遇到与我相同的问题,它可以节省一些时间

My case was quite annoying. Everything was right except for one unexpected thing. The config line

zend_extension = \xampp\php\ext\php_xdebug-2.2.5-5.5-vc11.dll

generated by the XDebug website is wrong. I had to change to

zend_extension = php_xdebug-2.2.5-5.5-vc11.dll

Hope it may save some time if anyone has the same problem as me in the future

一萌ing 2024-09-13 01:07:20

如果你还没有解决这个问题。以防万一,也适合任何寻找答案的人。转到 localhost(如果您使用的是 XAMPP)并单击左侧菜单的链接 phpinfo()。然后单击表格上的任意位置并按“Ctrl + C”。然后转到 http://xdebug.org/ find-binary.php 并将您刚刚从表格中复制的所有信息粘贴到白色文本框中,单击下面的链接,您将获得要下载的正确文件以及一些说明。下载到说明中指定的位置(即 C:\xampp\php\ext - 在我的例子中,我使用 XAMPP 1.7.7)转到您的 php.ini 文件,该文件应该位于“C:\xampp\php”中。 \php.ini' 并查找 kay-word '[XDebug]'。不要复制行 'zend_extension = C:\xampp\php\ext\php_xdebug-2.1.3-5.3-vc9.dll' (在我的例子中) ) 在 ';zend_extension = "C:\xampp\php\ext\php_xdebug.dll"' 行下注意:确保不要放置 ';' 。在刚刚粘贴的新行的开头,取消注释每个文本块底部的所有“exdebug.FUNCTION_NAME”行,然后

返回到 phpinfo() 页面。像之前一样将其粘贴到 xDebug 网站中,这应该足以让您正常工作。

PD:确保您从 xDebug 下载的文件大约为 147kb,因为在某些情况下人们下载的文件很小 。文件(ei.3kb)。

让我知道进展如何:)

If you havent solved this issue. Just in case and for anyone looking for an answer. Go to localhost (if your using XAMPP that is) and click on the left menu's link phpinfo(). Then click anywhere on the table and press "Ctrl + C'. Then go to http://xdebug.org/find-binary.php and paste all the info that you just copied from the table in the white text-box. Click the link below and youll have the right fil to download plus some instructions. Copy that file that you just downloaded into the location stated in the instructions (ie. C:\xampp\php\ext - in my case im using XAMPP 1.7.7). Go to your php.ini file that should hopefully be in 'C:\xampp\php\php.ini' and look for the kay-word '[XDebug]'. No copy the line 'zend_extension = C:\xampp\php\ext\php_xdebug-2.1.3-5.3-vc9.dll' (in my case) under the ';zend_extension = "C:\xampp\php\ext\php_xdebug.dll"' line. Note: make sure you dont put the ';' at the beginning of the new line that you just pasted. Now go ahead and uncomment all the 'exdebug.FUNCTION_NAME' lines that are at the bottom of each block of text.

Restart you server. Go back to your phpinfo() page, copy the table as you did before and paste it in the xDebug website. This should be enough for you to get it working.

PD: make sure that the file that you download from xDebug is approximately 147kb as there has been some instances where people download small files (ei. 3kb).

Let me know how it goes. :)

傲影 2024-09-13 01:07:20

Xdebug v2.0 不应该与 PHP 5.3 一起使用。
Xdebug v2.1 提供 PHP 5.3 支持。否则我会摆脱 xdebug ini 配置,除了:

zend_extension_ts = "C:\xampp\php\extensions\php_xdebug.dll"
xdebug.remote_enable   = On
xdebug.remote_host     = "localhost"
xdebug.remote_port     = 9000
xdebug.remote_handler  = "dbgp"

使用它作为你的测试,一旦它工作,然后添加额外的配置。确保注释掉其他 zend 内容。

Xdebug v2.0 shouldn't work with PHP 5.3.
Xdebug v2.1 provides PHP 5.3 support. Otherwise I would get rid of the xdebug ini config except:

zend_extension_ts = "C:\xampp\php\extensions\php_xdebug.dll"
xdebug.remote_enable   = On
xdebug.remote_host     = "localhost"
xdebug.remote_port     = 9000
xdebug.remote_handler  = "dbgp"

use this as your test and once this works then add additional configs. Make sure you comment out other zend stuff.

↙厌世 2024-09-13 01:07:20

joomla 网站有一个关于如何使 XAMPP、XDebug 和 Eclipse(Netbeans 以相同方式配置)协同工作的精彩教程,它们涵盖了所有主要操作系统。

http://docs.joomla.org/Setting_up_your_workstation_for_Joomla!_development

The joomla web site has a great tutorial on getting XAMPP, XDebug, and Eclipse (Netbeans is configured in the same fashion) working together and they cover all major operating systems.

http://docs.joomla.org/Setting_up_your_workstation_for_Joomla!_development

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文