如何在 Eclipse 中设置 Zend Debugger?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11404461/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How do I setup Zend Debugger in Eclipse?
提问by meanbunny
I am trying to setup my first PHP Development environment and I am having quite a bit of issues getting the Debug environment to work or more accurately hit breakpoints.
我正在尝试设置我的第一个 PHP 开发环境,但在使调试环境正常工作或更准确地命中断点方面遇到了很多问题。
Here is what I have done
这是我所做的
1.) Confirmed that php is working in my Apache server on Windows. I did this by creating a test index.php file with phpinfo() in it.
1.) 确认 php 在我的 Windows 上的 Apache 服务器中工作。我通过创建一个包含 phpinfo() 的测试 index.php 文件来做到这一点。
2.) I have installed the Zend Debugger into Eclipse.
2.) 我已将 Zend Debugger 安装到 Eclipse 中。
3.) I have setup my php.ini file with the following code.
3.) 我已经使用以下代码设置了我的 php.ini 文件。
[Zend]
zend_extension_ts="c:/php/ext/ZendDebugger.dll"
zend_debugger.allow_hosts=127.0.0.1/32
zend_debugger.expose_remotely=always
4.) I have opened up a port for the debugger in the windows firewall, in my case Eclipse says Zend is using 10000.
4.) 我在 Windows 防火墙中为调试器打开了一个端口,在我的例子中 Eclipse 说 Zend 正在使用 10000。
5.) I have added the dummy.php file into my document root directory.
5.) 我已将 dummy.php 文件添加到我的文档根目录中。
6.) I have restarted Apache after all of this.
6.) 在这一切之后,我重新启动了 Apache。
7.) When I go to test my debugger in eclipse I get the following error message.
7.) 当我在 Eclipse 中测试我的调试器时,我收到以下错误消息。
8.) When I look in the suggested section. I see this.
8.) 当我查看建议部分时。我看到这个。
采纳答案by ksiimson
The most likely cause is misconfiguration of PHP. Check phpinfo()
if you have Zend Debugger section and validate your configuration.
最可能的原因是 PHP 配置错误。检查phpinfo()
您是否有 Zend Debugger 部分并验证您的配置。
Note that the _ts
suffix in zend_debugger_ts
stands for Thread Safety. If your PHP is 5.3 or greater, or you have Thread Safety disabled (you can check this at phpinfo()), you will have to use zend_debugger
directive instead of zend_debugger_ts
.
请注意,_ts
后缀 inzend_debugger_ts
代表线程安全。如果您的 PHP 是 5.3 或更高版本,或者您禁用了线程安全(您可以在 phpinfo() 中检查),您将必须使用zend_debugger
指令而不是zend_debugger_ts
.
Also expose_remotely
acknowledges values 0
(Never), 1
(Always) and 2
(Allowed Hosts); any other value makes Zend Debugger undetectable.
还expose_remotely
确认值0
(从不)、1
(始终)和2
(允许的主机);任何其他值都使 Zend Debugger 无法检测。