扩展:DebugMode
DebugMode 发布状态: 测试 |
|
---|---|
实现 | 用户界面 |
描述 | 将wiki切换至调试模式 |
作者 | Ike Hecht (Tosfostalk) |
最新版本 | 0.1.0 (2014-10-28) |
MediaWiki | 1.23 |
PHP | 5.3 |
数据庫更新 | 否 |
许可协议 | GNU通用公眾授權條款2.0 or later |
下载 | |
|
|
翻译DebugMode扩展如果在translatewiki.net可用 | |
检查使用和版本矩阵。 |
The DebugMode extension puts the wiki into debug mode, which means all MediaWiki debugging parameters are switched on.
安装
- 下载文件,并将其放置在您
extensions/
文件夹中的DebugMode
目录内。
- 将下列代码放置在您的LocalSettings.php的底部:
require_once "$IP/extensions/DebugMode/DebugMode.php";
- 完成 – 在您的wiki上导航至Special:Version,以验证扩展已成功安装。
配置参数
$wgDebugMode
- Level of debugging. Can be set to
true
to enable all debugging orfalse
to do nothing.
Setting to
false
does not turn debugging off! It just leaves the existing settings alone.- Can be set using named constants in the DebugMode class, using bitwise operators:
DebugMode::DEBUG_MODE_NONE
: the extension does nothing, equivalent tofalse
;
Except in this mode, the following MediaWiki’s parameters are activated:$wgColorErrors
$wgDebugAPI
$wgDebugComments
$wgDebugDBTransactions
$wgDebugDumpSql
$wgDebugFunctionEntry
$wgDebugPrintHttpHeaders
$wgDebugTimestamps
$wgDebugToolbar
$wgDevelopmentWarnings
$wgLogExceptionBacktrace
$wgShowDBErrorBacktrace
$wgShowExceptionDetails
$wgShowSQLErrors
$wgProfileLimit
is set to0.0
,
DebugMode::DEBUG_MODE_INI
: set PHP’sdisplay_errors
totrue
;DebugMode::DEBUG_MODE_PHP
: set PHP’serror_reporting
to-1
(all debugging messages);DebugMode::DEBUG_MODE_VERBOSE
: activate MediaWiki’s$wgShowDebug
;DebugMode::DEBUG_MODE_CACHE
: deactivate MediaWiki’s$wgCachePages
,$wgDeprecationReleaseLimit
, and$wgEnableParserCache
;DebugMode::DEBUG_MODE_RESOURCE_LOADER
: activate MediaWiki’s$wgResourceLoaderDebug
and set MediaWiki’s$wgResourceLoaderMaxage
to1
;DebugMode::DEBUG_MODE_INSECURE
: (未使用);DebugMode::DEBUG_MODE_ALL
: all debugging modes are activated, equivalent totrue
.
- Default value is a reasonable level of debugging, which is
DebugMode::DEBUG_MODE_ALL
minusDebugMode::DEBUG_MODE_VERBOSE
. - Example:
DebugMode::DEBUG_MODE_ALL ^ DebugMode::DEBUG_MODE_INI ^ DebugMode::DEBUG_MODE_PHP
for “all but no PHP settings”.
$wgDebugModeIgnoreVars
- An array of variables that should be ignored by the extension. Can be used for more fine-tuning of variables than allowed by
$wgDebugMode
. These vars can be any named variables known to the extension, including MediaWiki globals and PHP settings. Default is an empty array, nothing is ignored. - Example:
array( 'wgDebugAPI' )
to ignore setting of$wgDebugAPI
.
See also
- The file DevelopmentSettings.php from MediaWiki 1.30.