DEV Community


Discussion on: Setting up Xdebug for VSCode in an Docker Environment 🙌

carlosguzman profile image
Carlos Guzmán

This is very useful, thanks!

Just a couple of contributions, just in case someone ends here and found the same issues that I had:

  1. If you are in the VSCode's debugging section and you don't see the small cog, but you see "Open a file which can be debugged or run...". Then you need to click on "Run" in the navigation menu, then click on the option "Add Configuration..." and finally choose PHP in the list that appears.

  2. If you are using Linux, then docker.for.mac.localhost or host.docker.internal in xdebug.remote_host don't work. You need to use the IP of your machine in your local network.

fuxide profile image
Flo Author

Great additions :) thanks!