Closed whocaresk closed 5 years ago
Seems like there is problem with my configuration. I'll close issue. Phpstorm still doesn't receive connection, but trouble definitely is on my side
@whocaresk I am getting this issue right now, my phpstorm looks just like that. Do you remember how you fixed it? Thanks
@whocaresk I am getting this issue right now, my phpstorm looks just like that. Do you remember how you fixed it? Thanks
try this xdebug.ini:
;zend_extension=xdebug.so
xdebug.remote_enable=1
xdebug.remote_autostart=0
xdebug.remote_connect_back=1
;;; if you are on macOS, use host.docker.internal to identify the host machine, due to a network limitation on mac (https://docs.docker.com/docker-for-mac/networking/#port-mapping)
;;; otherwise find host ip
;;; xdebug.remote_host=host.docker.internal
;;; avoid standard port (9000) conflicts using 9005 port
xdebug.remote_port=9005
xdebug.idekey=PHPStorm
and put this line into your Dockerfile:
COPY ./path/to/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
don't forget to set PHP_ENABLE_XDEBUG=1
env var.
and path mappings also:
And there is no way to enable it during build. At this moment docs are misleading and make you think that putting PHP_ENABLE_XDEBUG=1 in .env or docker-compose file will really enable xdebug.
example Dockerfile:
We can ensure that there is no files was created for xdebug (config, etc) by logging into created container and checking /etc/php/conf.d/xdebug.ini (there is no such file)