Cli/guide/Docker-Development-Environment/MediaWiki

MediaWiki Interaction
You can get a shell as your current user in the main MediaWiki container easily:

You can use the exec command to perform actions inside the MediaWiki container as a one off...

Such as, watching logs

PHPUnit tests
You can run PHPUnit tests in the MediaWiki cotnainer easily:

You may still need to use the old phpunit.php test running for some PHPUnit tests!

If you want to run tests with the debugged, see the XDebug section below.

XDebug
The default XDebug mode is, and the debugger will try to connect to.

If you want to alter the XDebug config you can do so using an environment variable.

It often makes sense to set the  to the public IP address of your physical device in your local network (i.e. wifi or ethernet IP).

You can set multiple xDebug config variables by leaving a space between them, for example:

If you change these environment variables after the MediaWiki containers are already running, you will need to recreate them to have the settings take effect.

Triggering for requests
See https://xdebug.org/docs/step_debug#activate_debugger

Example triggering from CLI inside the MediaWiki container:

Running with tests
You can run exec commands with environment variables, for example, if you want to make use of XDEBUG to step through a specific test in your IDE: