使用 Eclipse 和 xDebug 在浏览器上调试 PHP 文件
我一直在网上阅读有关 Eclipse 和 xDebug 上的开发人员使用 PHP 进行调试的内容。 我已经为Xdebug安装了所有必要的文件,现在,当我在Eclipse中时,我可以使用脚本运行调试器,而且工作正常。
问题是我在我的 Windows 机器上使用 AppServ(Apache、PHP 和 MySQL),我想做的是当我在浏览器中加载 PHP 页面(而不是运行它们)时在 Eclipse 中调试我的 PHP 文件如日食中的脚本)。
这可能吗?
乔尔
I have been reading online about debugging with PHP for Developers on Eclipse and xDebug.
I have installed all the necessary files for xDebug, and now when I am in Eclipse I can run the debugger with a script and it works just fine.
The issue is that i am using AppServ (Apache, PHP and MySQL) on my Windows machine, and what I would like to do is to debug my PHP files in Eclipse when I am loading the PHP pages in my browser (instead of running them as scripts in Eclipse).
Is that possible?
Joel
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在 Eclipse 中,转到“首选项”,然后转到“PHP”、“调试”、“已安装的调试器”、“XDebug”,然后转到“配置”
对于“接受远程会话”,将其更改为“localhost”
这将告诉 Eclipse 中的 XDebug 进行调试每当有人连接 xdebug cookie 或设置 URL 参数时 - 将其与 Easy Xdebug 一起使用 或 xDebug Helper 使在现实的浏览器内上下文中进行调试变得轻而易举。
我假设您有 Eclipse PDT,否则我不确定步骤是否不同。
In Eclipse, go to 'Preferences' then 'PHP' 'Debug' 'Installed Debuggers', 'XDebug', then 'Configure'
For 'Accept remote session' change this to 'localhost'
This will tell XDebug in Eclipse to debug whenever anyone connects with xdebug cookies or URL params set - using this with Easy Xdebug or xDebug Helper then makes debugging from realistic in-browser contexts a doddle.
I'm assuming you have Eclipse PDT for this, I'm not sure if the steps are different otherwise.
我不确定这是否是您所要求的,但您可以看一下并决定。
使用 Firefox 轻松进行 Xdebug https://addons.mozilla.org/en-美国/firefox/addon/easy-xdebug/
I'm not sure if this is what you ask for, but you can take a look and decide.
Easy Xdebug with Firefox https://addons.mozilla.org/en-US/firefox/addon/easy-xdebug/
在 Ooodles Technologies,我们广泛使用 PHP,希望这个答案有所帮助。
打开 php.ini 文件后,添加以下行:
注意:(php.ini 文件同时包含在 apache 和 php 文件夹中,建议配置 apache 文件夹中存在的文件)
之后,确保文件系统中存在“c:/wamp/tmp”,如果不存在则创建该目录。
然后重新启动您的 apache 服务。
最后,打开 NetBeans 或 eclipse IDE 并在设置中配置 xdebug。
我希望你觉得它有用。
Here at Oodles Technologies, we work with PHP on an extensive basis and hope this answer helps.
After opening your the php.ini file, add the following lines:
Note : (php.ini file contains in both the folders that is apache and php, it is advisable to configure the file which is present in apache folder)
After this, Make sure that "c:/wamp/tmp" exist in file system, if not then create that directory.
Then Restart your apache services.
Lastly, open your NetBeans or eclipse IDE and configure xdebug in settings.
I hope you find it useful.