Xdebug Netbeans Php Docker

我通过浏览器通过http://dev.app/?XDEBUG_SESSION_START=netbeans-xdebug开始,最好我可以得到页面搁置,执行停止,但Netbeans不停止在断点,但不断等待连接。 那是当我在127.0.0.1:10000 Netbeans设置代理。

它使更多的逻辑放在docker机192.168.99.100的IP,但随后页面刚刚加载,没有停止(赢家8.1的docker工具包)。 另外,当我在Netbeans中离开代理时,什么都不会停止。

当某个东西在10000上执行时,执行被暂停,而我放置了断点,但Netbeans正在等待连接。 Xdebug被安装并列在php -vphp -m 。我没有公开端口10000。

debugging器端口,项目URL和会话ID在Netbeans中设置。

Xdebug 文档说,当你设置xdebug.remote_connect_back=1你不需要指定远程主机。

我使用这个容器使用的xdebug.ini

 zend_extension=xdebug.so xdebug.default_enable=1 xdebug.remote_enable=1 xdebug.remote_handler=dbgp ; port 9000 is used by php-fpm xdebug.remote_port=10000 xdebug.remote_autostart=0 ; no need for remote host xdebug.remote_connect_back=1 xdebug.idekey="netbeans-xdebug" 

docker-compose.yml

 php-fpm: build: context: ./php-fpm dockerfile: Dockerfile-70 volumes_from: - application expose: - "9000" - "10000" ports: - "10000:10000" links: - workspace environment: PHP_IDE_CONFIG: "serverName=dev.app" nginx: build: ./nginx volumes_from: - application volumes: - ./logs/nginx/:/var/log/nginx ports: - "80:80" - "443:443" links: - php-fpm 

编辑:这是当我在Netbeans的192.168.99.1:10000监听xdebug.log,执行holded但仍然等待连接。 赢得防火墙禁用。 我没有停止从debugging。

 Log opened at 2016-05-26 09:38:04 I: Checking remote connect back address. I: Checking header 'HTTP_X_FORWARDED_FOR'. I: Checking header 'REMOTE_ADDR'. I: Remote address found, connecting to 192.168.99.1:10000. I: Connected to client. :-) -> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/x debug" fileuri="file:///var/www/laravel/public/index.php" language="PHP" xdebug: language_version="7.0.6" protocol_version="1.0" appid="6" idekey="netbeans-xdebu g"><engine version="2.4.0"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Re thans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Cop yright (c) 2002-2016 by Derick Rethans]]></copyright></init> -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/db gp/xdebug" status="stopping" reason="ok"></response> Log closed at 2016-05-26 09:38:25 root@b42a5193d501:/tmp# 

EDIT2:

Xdebug在vm之外绑定,php socket 连接 ,这是关于Netbeans没有发送正确的数据。 Netbeans中的path映射 。

想法如何debugging? Wireshark的?

当debugging开始时,这是netstat,Netbeans正在等待连接

 C:\Windows\System32>netstat -np TCP | find "10000" TCP 192.168.99.1:10000 192.168.99.1:57084 ESTABLISHED TCP 192.168.99.1:10000 192.168.99.100:55650 ESTABLISHED TCP 192.168.99.1:57084 192.168.99.1:10000 ESTABLISHED 

这是虚拟机内的netstat

 docker@default:~$ sudo netstat -plnt | grep ':10000' tcp 0 0 :::10000 :::* LISTEN 

telnet ::1 10000连接, telnet 192.168.99.1 10000telnet 192.168.99.100 10000不,所以我想我find了问题,dockervm期待连接:1 ip6这是奇怪的,因为我在整个窗口禁用它?