IP address for xdebug

Thanks for this excellent thread - I’ve been struggling with with the same XDebug problem with mac and PHPStorm and stumbled on to a slightly better way to setup your php.ini if you’re using Docker For Mac 17.06+:

xdebug.remote_enable=1
xdebug.remote_host=docker.for.mac.localhost
xdebug.remote_connect_back=0

At least this eliminates a static IP which is annoying if you’re on DHCP. I’m working on a new image that will hopefully be able to do a detection if it’s Docker For Mac or not and setup the php.ini this way if so, otherwise use remote_connect_back.

2 Likes