-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Connection with 'xdebug 2.4.1' was not established. #460
Comments
What is the exact error message? |
|
I noticed that |
I am using MacOS, I find my host ip in nginx logs, that is 172.18.0.1 |
I run on Windows 10. I wonder if anyone using MacOS can respond to this. |
I am aware of at least one other MacOS user that was unable to connect to local IP from Docker Contain. Never heard anything further. |
I find that the PHPSTORM always get the php information as |
Hello, The problem is that, on NGINX side, requests seems to come from the gateway of docker instead from the dockerhost ip. See this nginx access.log line: the IP is 172.20.0.1 but my dockerhost ip (the one on the Docker network i have on windows) is 10.0.75.2 this is the xdebug log:
also, while checking port 9000 on 10.0.75.2 (my docker host) from the php-fpm container give an OK (i mean php-fpm can reach that port on that ip), the same check on 172.20.0.1:9000 give a KO:
This is the inspection of php-fpm container:
Now i'm missing how to solve this problem as apparently Nginx is not used as reverse proxy so i would avoid remote-address replacing. Do you know of any solution? PS. a solution that worked for me after discovering this is to set Anyway actually it seems phpstorm can't show me the execution point, it breaks but i don't see where the execution point is in the code. probably this is an IDE/mapping problem i have to investigate. |
Hello, then i've read this on the docker repo: it seems is a known problem. |
Has anybody gotten this to work on macOS? I have been fighting this for past two hours and getting nowhere :-( |
@lechengyu it works! You solve the problem I have met for a long time. |
@lechengyu Could you send the PR to improve document? |
@HolyKindom
Now i can debug with php-fpm. Updated: |
I just spent to long on this issue I had remote_connect_back set to 1 incorrectly. Thanks to @lechengyu this is the config that works |
I followed the guide of xdebug for phpstorm step by step.
But got the following issue.
Connection with 'xdebug 2.4.1' was not established
I'm not sure if I have configured correctly.
In the host, I add some host in
etc/hosts
In the
docker-compose.yml
I have configured the ssh, so I could ssh with the command
ssh -p2222 root@laravel
, and success visithttp://laravel/
in host browser.phpunit worked fine, but failed when debug.
I noticed that it is php7.0.9 in php-fpm container, but we actually using the php7.0.12 cli in workspace.
The text was updated successfully, but these errors were encountered: