Talk:Cli/guide/Docker-Development-Environment/MediaWiki

About this board

Setting up Xdebug on Linux

2
Lens0021 (talkcontribs)

On Linux (Debian bullseye and Docker 20.10.17, in my case), I guess I have to set the below extra_hosts for xdebug according to this Stack Overflow answer.

(mw docker env set MEDIAWIKI_XDEBUG_CONFIG "client_host=127.0.0.1" and localhost do not work for me)

extra_hosts:
  - "host.docker.internal:host-gateway"

I tried to edit $(mw dev where)/mediawiki.yml, but the file seems to be overwritten whenever I execute mw dev mw create.

Alternatively, I had to mw docker env set MEDIAWIKI_XDEBUG_CONFIG "client_host=172.17.0.1" and it worked for me. It is suggested on this Stack Overflow answer.

Could this be improved? I do even not know 172.17.0.1 meaning.

Addshore (talkcontribs)

Indeed mediawiki.yml is overwritten if you change it. I believe `172.17.0.1` is an IP used by the docker network that is created. If this works for you it might be worth documenting this on the section about xdebug and see if it helps other folks too!

Reply to "Setting up Xdebug on Linux"
There are no older topics