2015-12-02 78 views
1

Netbeans的,继续给{远程Xdebug的等待连接} 我使用的无业游民UBUNTU BOX 在服务器 [Xdebug的]Xdebug的,流浪的,Ubuntu,和Netbeans集成

zend_extension=xdebug.so 
xdebug.cli_color = 1 
xdebug.remote_enable=on 
xdebug.remote_log="/var/log/xdebug.log" 
xdebug.remote_connect_back = 0 
xdebug.remote_host=192.168.44.1 
xdebug.var_display_max_children=512 
xdebug.var_display_max_depth=20 
xdebug.var_display_max_data=-1 
xdebug.profiler_enable = 0 
xdebug.profiler_enable_trigger = 1 
xdebug.profiler_output_dir = "/vagrant" 
xdebug.max_nesting_level = 512 
xdebug.remote_port = 9000 
xdebug.idekey=xdebug 

我可以ping 192.168.44.1从我的本地机器

[Netbeans的] 项目高级配置:

Host: 192.168.44.1 Port: 9000 

调试配置:

Debugger Port: 9000 
SessiinID: xdebug 

所以我的问题是,每次我添加了一个破发点并运行调试文件,它不断尝试连接到主机的Xdebug

任何建议!

+0

可以调试无法通过本地计算机的计算机192.168.44.1上?我的答案有点过时,但步骤相似。 [xdebug netbeans](http://stackoverflow.com/a/13021858/1322642) –

回答

0

我有同样的问题,并发现这篇文章,以帮助我:http://pietervogelaar.nl/php-xdebug-netbeans-vagrant

在文章这个底部是帮我出了一部分:

Xdebug的距离内通过命令行(Vagrant)虚拟机如果要在虚拟机内使用命令行脚本或phpunit使用Xdebug,那么到目前为止仍不能使用定义为 的设置。因为Xdebug不会找到连接回的远程主机。

在虚拟机内运行以下命令:

netstat -rn 

你可能会看到类似:

Kernel IP routing table 
Destination  Gateway   Genmask   Flags MSS Window irtt Iface 
0.0.0.0   10.0.2.2  0.0.0.0   UG  0 0   0 eth0 
0.0.0.0   10.0.2.2  0.0.0.0   UG  0 0   0 eth0 
10.0.2.0  0.0.0.0   255.255.255.0 U   0 0   0 eth0 
192.168.33.0 0.0.0.0   255.255.255.0 U   0 0   0 eth1 

这就告诉我们,该Xdebug的必须连接到IP地址为 10.0。 2.2。因此,通过下面的例子命令它应该工作:

php -d xdebug.remote_host=10.0.2.2 phpunit -c module/Application/test