Eclipse Aptana Studio 3,Windows 与虚拟机的 xdebug 配置

Eclipse Aptana Studio 3, xdebug configuration for Windows with virtual machine

我在使用 Aptana Studio 调试 php 文件时遇到问题。不知道能不能搞定,因为工作方式有点复杂

实际上,我将源 PHP 文件放入本地 Windows 机器,还有我的 Aptana 工作室。 Apache 服务器已安装在 Ubuntu 虚拟机上,并将我本地 Windows 机器的文件作为源文件。

从网络浏览器进入我的本地 Windows 我给虚拟机充电 URL 我想从 Eclipse/Aptana.

调试

我必须在 Eclipse 中配置 Xdebug,但我没有发现在我的情况下该怎么做的问题。

有没有人有同样的问题或想法?

最终我们找到了 Eclipse PDT 的解决方案,但同样适用于 Aptana,只是 eclipse 配置略有不同。

为了实现远程调试,您必须在虚拟机所在的位置安装 xdebug 包(在我们的例子中是 Ubuntu 虚拟机)。

进入/etc/php/7.0/mods-available/xdebug.ini后你必须配置2行:

xdebug.remote_enable=on 
xdebug.remote_host=192.X.XX 

其中 remote_host 是包含 eclipse 的本地计算机的 IP。

此外,您必须更改 eclipse 配置 Windows->Preference->PHP->Debug->Debuggers- >Xdebug 放置调试端口(与 xdebug.ini 文件中相同 - 默认 9000),并将 Accept remote session (JIT) 设置为 任意.

对于 Aptana,通过搜索接受远程会话 (JIT) 的位置来更改 xdebug 配置。