Netbeans,保持给定{远程xdebug等待连接}我正在使用流浪UBUNTU BOX在服务器上[xdebug]
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
所以我的问题是,每次我添加一个断点并运行调试文件时,它都会一直尝试连接到Host Xdebug
有什么建议吗!
我遇到了同样的问题,并找到了这篇文章来帮助我:http://pietervogelaar.nl/php-xdebug-netbeans-vagrant
在文章的底部,这是帮助我的部分:
从(Vagrant)虚拟机内的命令行进行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