PHP Interpreter from docker running inside a VM (Vagrant)
I have a php project relying on a virtual machine (VirtualBox and Vagrant), where PHP is running as a container (please don't ask me why this setup ;)). I want to configure the PHP interpreter, so that I can run and debug code from the IDE, but don't know how.
So if anyone has already been through such a setup I would appreciate his help
请先登录再写评论。
Just to confirm, your intention is to run your code in the CLI mode, right? Run tests, for instance?
Or you want to debug a web application?
If that's correct, please check point 3 in this comment.
You'll also need to set the xdebug.remote_host (or xdebug.client_host in Xdebug 3) to an IP the container can use to connect to the host machine.