Currently there is a set of debug configurations maintained in the `mediawiki/conf.d` directory of the integration/jenkins.git repository. This is included in (most) Jenkins jobs that run MediaWiki tests (PHPUnit, QUnit or otherwise).
<https://github.com/wikimedia/integration-jenkins/tree/master/mediawiki/conf.d>
When working locally (e.g. via MediaWiki-Vagrant) or when running tests via Travis CI, however, these settings don't apply.
There are some Jenkins and/or Wikimedia specific things here, but for the most part it might make sense to maintain these in MediaWiki core instead (e.g. `tests/DebugTestSettings.php` or some such).
At the very least this would contain the following:
```lang=php
/ Debugging: PHP
error_reporting( -1 );
ini_set( 'display_errors', 1 );
// Debugging: MediaWiki
$wgDevelopmentWarnings = true;
$wgShowDBErrorBacktrace = true;
$wgShowExceptionDetails = true;
$wgShowSQLErrors = true;
```
Context: Debugging Postgres failures on Travis CI (T75174) is difficult given by default `$wgShowExceptionDetails` is false and thus a useless error was shown until manually a pull-request was drafted on GitHub to re-run the tests with this enabled. We could append this within `.travis.yml` only, but given that we want the same in Jenkins and other places were we run tests, it might make more sense if MediaWiki had a way of enabling these (and other settings) by default when running tests. Or at least provided a file that can be easily included from various places, which could happen by default in `phpunit.php`, or perhaps via a command-line switch (opt-in).