To use xdebug with macOS and docker is quite, let´s call it tricky ;)
The following steps need to be proceed to get it working:
- use the config from the xdebug.ini wihtin your docker web container. Important: set remote_connect_back to off
- set up an alias for your local interface (lo)
To bring up the alias at startup, you can either (sudo may be needed here):