Remote Xdebug with VirtualBox

后端 未结 6 1182
盖世英雄少女心
盖世英雄少女心 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:16

    The virtual machine needs to be able to talk back to the host machine and to make that happen you need to forward 9000 to do this. This step is not described in some setups because it happens in the background.

    To do this, issue the command ssh -L 9000:localhost:9000 yourUserName@youVirtualMachine.

    To simplify this, I have the name of the virtual machine in /etc/hosts and in my ~/ssh/config file.

提交回复
热议问题