My IDE is IntelliJ and it is configured and working with Xdebug and PHP 5.6.
It is working in my host machine (MacOS) but when I turn on the Docker, the debug process fails.
If I try to expose the port 9000 (docker run -p 80:80 -p 9000:9000 ...
) when I run the image I get an error inside IntelliJ -> port 9000 is in use
.
If I do not expose the port 9000, I get nothing inside IntelliJ,
Here is part of the php.ini inside docker: that shows that xdebug is enabled.
[xdebug]
zend_extension = /usr/local/lib/php/extensions/no-debug-non-zts-20131226/xdebug.so
xdebug.remote_enable=1
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_autostart=1
What I am doing wrong?