Under the following IP my Container run successful in my Webbrowser
http://192.168.99.100:32775
I have also create a volume to share files between my container and my filesystem
docker run --name lampf -d -p 32775:80 -v /Users/sja/Sites/lamkepf2:/var/www/html --link=lampf_db:db codinglimo/apache_php540_gs_imgmck_pdflib9
Now I install also xDebug successful in my container with the following xdebug.ini
zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so" xdebug.remote_enable=on xdebug.remote_host=127.0.0.1 xdebug.remote_port=9000 xdebug.remote_handler=dbgp xdebug.profiler_enable=0 xdebug.profiler_output_dir="/temp/profiledir"
PHPStorm is also configured
http://img2.picload.org/image/iowdpww/xdebug.png
But my Breakpoints in my index.php are ignored? What is my mistake?
Problem is solve with help from Sergey
My new xdebug.ini
zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so" xdebug.remote_enable=on #xdebug.remote_host=127.0.0.1 xdebug.remote_port=9000 xdebug.remote_connect_back=On xdebug.remote_handler=dbgp xdebug.profiler_enable=0 xdebug.profiler_output_dir="/temp/profiledir"
If you want to debug in Docker Compose, run the command Docker Compose Up using one of the two Docker Compose files as described in the previous section, and then attach using the appropriate Attach launch configuration. Launching directly using the normal launch configuration does not use Docker Compose.
Your Docker container can't see your PHP Storm IDE with the IP 127.0.0.1, typically the host is 172.17.42.1 from within a container. Also remote_connect_back won't work well probably. Try setting it up like this:
xdebug.remote_host=172.17.42.1 xdebug.remote_connect_back=Off
You might need to look for a proper way to know the host's IP within your container, 172.17.42.1 is just the default but it might not always be that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With