Xdebug and docker4drupal on mac

To have xdebug working, you need to have this in your docker config for PHP.

      PHP_XDEBUG: 1
      PHP_XDEBUG_DEFAULT_ENABLE: 1
      PHP_XDEBUG_REMOTE_CONNECT_BACK: 0
      PHP_XDEBUG_REMOTE_HOST: 10.254.254.254 # macOS, Docker < 18.03

Also it is often noted that this should also be run

sudo ifconfig lo0 alias 10.254.254.254

So if your debuger is listening on 9000 port, this should work.