I'm not sure what exactly is going wrong here, but @mewoph reports that XDebug is not present when using the latest docker-compose.yml stack we have (wtih the web/php container split) on Docker for Mac.
Output of docker-compose exec mediawiki php --version is:
PHP 7.2.31-1+0~20200514.41+debian9~1.gbpe2a56b+wmf1 (cli) (built: May 29 2020 08:36:37) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.2.31-1+0~20200514.41+debian9~1.gbpe2a56b+wmf1, Copyright (c) 1999-2018, by Zend Technologies
.env file contents are:
MW_DOCKER_PORT=8080 MW_SCRIPT_PATH=/w MW_SERVER=http://localhost:8080 MEDIAWIKI_USER=Admin MEDIAWIKI_PASSWORD=dockerpass XDEBUG_CONFIG='' MW_DOCKER_UID=502 MW_DOCKER_GID=20
The output of phpinfo(); via the web doesn't show XDebug loaded, although there is a reference to /etc/php/7.2/fpm/conf.d/20-xdebug.ini.
I can't reproduce this on Linux (didn't try on a Mac yet) but it's not obvious to me what is wrong here.