-
-
Notifications
You must be signed in to change notification settings - Fork 585
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
Improve xdebug support with "host.docker.internal" hostname #736
Comments
With Docker Edge, the short-term approach is simple: The project's .ddev/php/xdebug.ini can contain
I don't believe that "host.docker.internal" is supported in Stable yet, but it will probably land there with the next quarterly release, as soon as the end of March, 2018. There's a problem with this though on Windows, starting with Docker for Windows 18.03.0-ce-rc3-win56, ddev is completely broken by Edge, see #739 |
@rfay, thanks for the information. I'll try an older version of Docker for Windows edge and report back. |
I reinstalled Docker for Windows using version 18.03.0-ce-rc1-win54 (16164) edge, and configured Debugging with Visual Studio Code is still not working :>( See Figure 1 for my debug configuration in See Figure 2 for xdebug settings in (FWIW, I confirmed that xdebug does work for local development outside ddev). Figure 1
Figure 2
|
Have you confirmed that your editor is listening on port 11011? You should be able to connect to it via tcp. |
I should have mentioned that your Windows firewall settings can definitely blow this up - try making them very easy (allow temporarily from everywhere). From within the container ( |
@rfay , just a note to let you know I'm working on it. Port 11011 is declarative in
I have added Firewall is turned off, temporarily. On starting the debugger, the output of the Debug Console is:
Program does not stop at breakpoints, and no xdebug log is written. |
P.S. Thanks for your attention to this issue. I'm sure you have lots of other fish to fry :>) |
This is definitely important to solve. Sorry to say I don't have enough Windows resources to test it adequately, but hope to get that sorted out soon. |
I confirm that this works fine in Windows 10 Pro, ddev v0.15.1, Docker 18.03.0-ce-rc1-win54 (later RCs are completely broken for other reasons). The approach in #736 (comment) works perfectly with PHPStorm. I did have to tell Windows at each step to allow the network access. But I was able to test as suggested with The basic questions are:
Please note that with this week's release (probably late this week) we'll be switching to xdebug off by default for performance reasons, so you'll need to pay attention to that. |
Now that 18.03 is the stable Docker version we can implement this. |
Added this to v0.18.0. Mostly all we have to do is a minor change to the php config and a massive simplification of the docs. No more setting IP addresses. |
What happened (or feature request):
Docker 18.03+ now supports the hostname "host.docker.internal" to reach the host, which means we'll no longer have to have people add a special network interface IP (172.28.99.99) to use xdebug.
Also, we may be able to use remote.connect_back depending on how docker has implemented networking in Edge. But probably we don't even have to do that, because we can use the magic hostname.
What you expected to happen:
How to reproduce this:
Version: Please include the output of
ddev version
,docker version
and the project's .ddev/config.yaml.Anything else do we need to know:
Related source links or issues:
Please use a complexity rating of 1-5 (5 is high) for a feature request. (High complexity implies more PR planning)
The text was updated successfully, but these errors were encountered: