Last edited 3 weeks ago
by Robert Vogel

How to debug: Difference between revisions

(Created page with "== Server side debugging == === Wiki application === ==== General debug log ==== ==== Log channels ==== == Client side debugging == === Browser development tools === ==== JavaScript console ==== ==== Network panel ====")
 
No edit summary
Line 1: Line 1:
Sometimes things go wrong. In many cases the user is then confronted with cryptic or no error messages at all. This page provides help about getting more information about what exactly went wrong, so it can be fixed quickly. This is especially important when asking for help on locations like [https://community.bluespice.com community.bluespice.com].
Additional information can also be found at [[mediawikiwiki:Manual:How_to_debug|"Manual:How to debug" on MediaWiki.org]].{{Textbox|boxtype=warning|header=Check for sensitive information|text=Most of the techniques described here will output very detailed information about the error, but also about the system and the context. The output may contain sensitive information like usernames, passwords, pathes, access-keys and many more. Before posting any information retrieved by this kind of debugging on a public location (like [https://community.bluespice.com community.bluespice.com]), make sure to redact all potential sensitive information!|icon=yes}}
== Server side debugging ==
== Server side debugging ==
There are various ways to get more information about errors by changing some configuration on the server side.


=== Wiki application ===
=== Wiki application ===
==== Enable detailed error reporting ====
Within you <code>LocalSettings.php</code> file, please add the following lines:<syntaxhighlight lang="php">
$GLOBALS['wgShowSQLErrors'] = true;
$GLOBALS['wgDebugDumpSql']  = true;
$GLOBALS['wgShowExceptionDetails'] = true;
$GLOBALS['wgShowDBErrorBacktrace'] = true;
</syntaxhighlight>This will turn error messages like <code>internal_api_error_DBQueryError</code> into a more detailed stack of program calls, including database queries and responses.


==== General debug log ====
==== General debug log ====

Revision as of 10:33, 4 December 2023

Sometimes things go wrong. In many cases the user is then confronted with cryptic or no error messages at all. This page provides help about getting more information about what exactly went wrong, so it can be fixed quickly. This is especially important when asking for help on locations like community.bluespice.com.

Additional information can also be found at "Manual:How to debug" on MediaWiki.org.

Check for sensitive informationMost of the techniques described here will output very detailed information about the error, but also about the system and the context. The output may contain sensitive information like usernames, passwords, pathes, access-keys and many more. Before posting any information retrieved by this kind of debugging on a public location (like community.bluespice.com), make sure to redact all potential sensitive information!


Server side debugging

There are various ways to get more information about errors by changing some configuration on the server side.

Wiki application

Enable detailed error reporting

Within you LocalSettings.php file, please add the following lines:

$GLOBALS['wgShowSQLErrors'] = true;
$GLOBALS['wgDebugDumpSql']  = true;
$GLOBALS['wgShowExceptionDetails'] = true;
$GLOBALS['wgShowDBErrorBacktrace'] = true;

This will turn error messages like internal_api_error_DBQueryError into a more detailed stack of program calls, including database queries and responses.

General debug log

Log channels

Client side debugging

Browser development tools

JavaScript console

Network panel



To submit feedback about this documentation, visit our community forum.