Remote Xdebug with VirtualBox

后端 未结 6 1171
盖世英雄少女心
盖世英雄少女心 2021-02-02 00:55

I\'m trying to get remote debugging to work. The PHP is running on a VM and I\'m trying to debug from NetBeans on the host machine.

I\'ve followed the instructions here

6条回答
  •  不思量自难忘°
    2021-02-02 01:15

    3 conditions must be fullfilled for xdebug to work remotely with VirtualBox, I had it especially in connection with Docker inside virtualbox.

    1) remote_connect_back=0 or exact ip address of your host machine must be listed in remote_host (, sometimes both at the same time don't work together, especially in the case of docker being separately from virtualbox at windows hyper-v directly)

    2) no other application like eg web-project can be exposed at port 9000, that must be reserved for php editor, or different port must be reserved by editor/listened at (or for php web project), and addressed/transmitted to from the php

    3) it's similar to the second point, virtual box must have no port forwarding to that port, as it would effectively occupy it but it must be reserved for php editor, not for virtualbox port forwarding, not virtualbox has to listen at that port to be forwarded to some internal app, but outernal php-editor has to listen for it=that port

提交回复
热议问题