我遵循了许多用户指南,花了很长时间,阅读了这些问题
如何使用 netbeans 和 Xdebug 调试 PHP
如何在 Windows 中使用 netbeans 和 Xdebug 调试 PHP?< /a>
如何在 Netbeans 中调试 PHP 测试文件?< /a>
使用 Netbeans 调试 php - 新手源请求
在 Firefox 中调试 Netbeans 中的下一个 PHP 页面
如何调试 PHP 应用程序?
如何在netbeans中运行php文件
,目前正在等待我的头发重新长出来,以便再次将其撕掉。
无论如何,看来其他人一定已经解决了这个问题,所以……有人能给我一个免费虚拟机的下载 URL,该虚拟机的 Netbans 配置为使用 PHP 进行 Xdebug 吗?
显然是Linux;我更喜欢 Ubuntu,但我会接受任何东西。我稍微偏爱 Virtual Box,但 VMware 也不错。
我相信这会对很多人有所帮助,所以我代表我们大家表示感谢。
或者,您可能希望发布一个(链接到)已知正在运行的 PHP.INI(尽管我知道这需要一些编辑)
I have followed many user guides, spent many a long hour, read these questions on S.O
How to debug PHP with netbeans and Xdebug
How to debug PHP with netbeans and Xdebug in Windows?
How do you debug a PHP test file in Netbeans?
Debug php with Netbeans - Newbie source request
Debug next PHP page in Netbeans from Firefox
How to debug a PHP application?
how to run php file in netbeans
and am currently waiting for my hair to grow back in order to tear it out again.
Anyhoo, it seems that someone else must have solved this already, so … can anyone point me at a download URL for a free virtual machine with Netbans configured for Xdebug with PHP?
Obviously it will be Linux; I would prefer Ubuntu, but will accept anything. I have a slight preference for Virtual Box, but VMware is just fine.
I am sure that this will help many people, so thanks on behalf of us all.
Alternatively, you may wish to post a (link to a) known to be working PHP.INI (although I appreciate that that will requier a little edtting)
我无法为您提供 VHD 下载,但这就是我使用 VirtualBox
网络设置
完成的方式这可能是最重要的一点。将两个网络适配器添加到您的虚拟机。第一个可以是标准 NAT 连接,以便您的虚拟机可以连接到 Internet。将第二个设置为“仅主机适配器”。
将 Ubuntu Server 安装到您的 VM 上。
打开
/etc/network/interfaces
并添加第二个适配器,其静态 IP 在 192.168.56.1/24 范围内(这是 VirtualBox 仅主机网络子网),例如,重新启动虚拟机后,您可以应该能够通过该静态 IP 连接到它。
我 ♥ LAMP
sudo /usr/local/zend/bin/pecl install xdebug
。您可能需要安装一些依赖项,例如gcc
和make
才能正常工作。sudo rm /usr/local/zend/etc/conf.d/debugger.ini
使用以下内容配置 XDebug。将此添加到
/usr/local/zend/etc/php.ini
中的[Zend]
部分上方您不需要使用 Zend然而我发现服务器是最好的 LAMP 堆栈。您可能可以通过安装默认的 LAMP 堆栈然后安装 XDebug 来获得
I can't offer you a VHD download but this is how I've done mine using VirtualBox
Networking Setup
This is probably the most important bit. Add two network adapters to your VM. The first can be a standard NAT connection so your VM can connect to the Internet. Make the second a "Host-only Adapter".
Install Ubuntu Server onto your VM.
Open
/etc/network/interfaces
and add the second adapter with a static IP in the 192.168.56.1/24 range (this is the VirtualBox host-only network subnet), egAfter restarting your VM, you should be able to connect to it on that static IP.
I ♥ LAMP
sudo /usr/local/zend/bin/pecl install xdebug
. You may need to install some dependencies likegcc
andmake
before this works.sudo rm /usr/local/zend/etc/conf.d/debugger.ini
Configure XDebug with the following. Add this above the
[Zend]
section in/usr/local/zend/etc/php.ini
You don't need to use Zend Server however I find it's the best LAMP stack around. You can probably get by installing the default LAMP stack then installing XDebug