-
Notifications
You must be signed in to change notification settings - Fork 17
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
Docker image bscheshir/php:7.2.5-fpm-alpine-4yii2-xdebug cannot connect to the host machine for XDebug #1
Comments
@James-ZHANG please, check next steps:
to your machine IP / external DN (for example dev-Aspire-V3-772 ). In mac OS you can use docker special name host.docker.internal .Second: in your PHPStorm Settings > Languages & Frameworks > PHP > Servers page set server name value is equal to serverName
(other values ip , port is even don't matter).Additional you mast set "use path mapping" : /your/machine/path/to/php-code=/var/www/html .Also in page Settings > Languages & Frameworks > PHP > Debug check correct port in Xdebug > Debug port
remote_port=9001
UPD: first try with IP address in |
@bscheshirwork , thanks for the response. I adjusted the However, the dns approach still does not work; and since I use ubuntu, the special name
inside the container? I'm pretty new to Docker and according to my understanding this cannot be done inside a Last, thank you for sharing this docker compose template. |
yes, your right. I already propose add
this is change container, right? I already see it solution and I against about it. Yes, you right. This is unresolved problem now. also my example
is incorrect (this is local dns-server rule. Also you can use external (out of container) IP, (within case if your router set it too) |
I see, so I think it's better to update the |
resolved in 9b9f483 |
docker/for-linux#264 (comment) @James-ZHANG you can try it |
Hi, I've tried to set up a
yii2-advanced
template through yourdocker-compose
settings. It works nicely on a first try and I could access the template application through the web browser.However, I've had difficulty configuring the
XDebug
support for PhpStorm. It seems the problem is: within the containerbscheshir/php:7.2.5-fpm-alpine-4yii2-xdebug
you cannot connect to the host machine through a dns entry like127.0.0.1 my-fancy-servername
in/etc/hosts
.To trigger the problem:
install.md
, with thephp-code
directory filled with ayii2-advanced
template project.XDebug
as the debugger.PHP Web Page
debug setting.The symptom: The application can be started in the browser, but the breakpoint cannot be hit.
The text was updated successfully, but these errors were encountered: