New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Xdebug is not working with Docker for Mac #389
Comments
yeah, I had the same problem, as workaround I did:
some useful links: |
Try it with
Docksal is using You could technically change the default network Docker for Mac is using to |
TL;DRShort term, this can be used with Docker for Mac. Add to
In Docker for Mac, The long story
On Docker for Mac,
However, that bridge IP cannot be used to access the host back and the following will show up in xdebug logs (xdebug.remote_log to enabled logging):
With VirtualBox, host requests originate via the host-only network and
That one CAN be used by containers to reach back to the host. With Docker for Mac/Windows, we've been setting the canonical Docksal IP ( |
Needs to be added to docs/tools/xdebug.md |
Yes, I'm updating the xdebug docs as well. Not finished yet. |
In case this helps anyone else, Docker 18.03 (and later) enable you to use a special hostname to connect to the host.
This means you don't need to get/use the host's IP address anymore. NOTE: This is for development purposes only and will not work in a production environment outside of Docker for Mac. |
@lmakarov should we update stacks with the above? |
@wireblue Tnks, you save my life with this line! |
@lmakarov looks like it is still the issue |
I'll update the xdebug docs if you would like? |
Its not about the docs per se. If But this needs to be tested across different OSs and different Docker setups (Vbox/Docker Desktop) |
Linux support for this is almost there: docker/for-linux#264 |
I've just double checked this. We do not need to rely on The default Docksal stack(s) ship with the necessary xdebug settings: Lines 146 to 149 in c0f2a12
I checked this with Docker Desktop for Mac and xdebug works fine for me using the docksal/boilerplate-drupal8 repo ( If xdebug does not work in a project, then the project stack us likely custom and outdated. |
Xdebug does not seem to be working with Docker for Mac.
The text was updated successfully, but these errors were encountered: