CINXE.COM
Manual:How to debug: Difference between revisions - MediaWiki
<!DOCTYPE html> <html class="client-nojs vector-feature-language-in-header-disabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-disabled vector-feature-custom-font-size-clientpref--excluded vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-disabled skin-theme-clientpref-day vector-toc-available" lang="en" dir="ltr"> <head> <meta charset="UTF-8"> <title>Manual:How to debug: Difference between revisions - MediaWiki</title> <script>(function(){var className="client-js vector-feature-language-in-header-disabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-disabled vector-feature-custom-font-size-clientpref--excluded vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-disabled skin-theme-clientpref-day vector-toc-available";var cookie=document.cookie.match(/(?:^|; )mediawikiwikimwclientpreferences=([^;]+)/);if(cookie){cookie[1].split('%2C').forEach(function(pref){className=className.replace(new RegExp('(^| )'+pref.replace(/-clientpref-\w+$|[^\w-]+/g,'')+'-clientpref-\\w+( |$)'),'$1'+pref+'$2');});}document.documentElement.className=className;}());RLCONF={"wgBreakFrames":false,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""], "wgDefaultDateFormat":"dmy","wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgRequestId":"52ce276a-d1bc-4d0b-a740-118f5b183758","wgCanonicalNamespace":"Manual","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":100,"wgPageName":"Manual:How_to_debug","wgTitle":"How to debug","wgCurRevisionId":6871907,"wgRevisionId":6871907,"wgArticleId":16025,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["MediaWiki development","Log","Debug"],"wgPageViewLanguage":"en","wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgRelevantPageName":"Manual:How_to_debug","wgRelevantArticleId":16025,"wgIsProbablyEditable":false,"wgRelevantPageIsProbablyEditable":false,"wgRestrictionEdit":["autoconfirmed"],"wgRestrictionMove":["autoconfirmed"],"wgNoticeProject":"mediawiki","wgCiteReferencePreviewsActive":true,"wgMediaViewerOnClick":true, "wgMediaViewerEnabledByDefault":true,"wgVisualEditor":{"pageLanguageCode":"en","pageLanguageDir":"ltr","pageVariantFallbacks":"en"},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":false,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":20000,"extRevisionSliderTimeOffset":0,"wgDiffOldId":6871906,"wgDiffNewId":6871907,"wgTranslatePageTranslation":"source","wgEditSubmitButtonLabelPublish":true,"wgULSPosition":"personal","wgULSisCompactLinksEnabled":true,"wgVector2022LanguageInHeader":false,"wgULSisLanguageSelectorEmpty":false,"wgCheckUserClientHintsHeadersJsApi":["brands","architecture","bitness","fullVersionList","mobile","model","platform","platformVersion"]};RLSTATE={"ext.globalCssJs.user.styles":"ready","site.styles":"ready","user.styles":"ready","ext.globalCssJs.user":"ready","user":"ready","user.options":"loading","ext.visualEditor.diffPage.init.styles":"ready","oojs-ui.styles.icons-accessibility":"ready", "oojs-ui.styles.icons-editing-advanced":"ready","oojs-ui-core.styles":"ready","oojs-ui.styles.indicators":"ready","mediawiki.widgets.styles":"ready","oojs-ui-core.icons":"ready","ext.RevisionSlider.lazyCss":"ready","mediawiki.interface.helpers.styles":"ready","mediawiki.diff.styles":"ready","ext.translate.tag.languages":"ready","ext.pygments":"ready","mediawiki.helplink":"ready","skins.vector.search.codex.styles":"ready","skins.vector.styles":"ready","skins.vector.icons":"ready","ext.translate.edit.documentation.styles":"ready","ext.translate":"ready","ext.wikimediamessages.styles":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","ext.uls.pt":"ready","wikibase.client.init":"ready","ext.wikimediaBadges":"ready"};RLPAGEMODULES=["ext.visualEditor.diffPage.init","ext.RevisionSlider.lazyJs","mediawiki.diff","ext.pygments.view","site","mediawiki.page.ready","mediawiki.toc","skins.vector.js","ext.centralNotice.geoIP","ext.translate.pagetranslation.uls", "ext.urlShortener.toolbar","ext.centralauth.centralautologin","mmv.bootstrap","ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.echo.centralauth","ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming","ext.uls.compactlinks","ext.uls.interface","ext.checkUser.clientHints"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.impl(function(){return["user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"}); }];});});</script> <link rel="stylesheet" href="/w/load.php?lang=en&modules=ext.RevisionSlider.lazyCss%7Cext.pygments%2Ctranslate%2CwikimediaBadges%7Cext.translate.edit.documentation.styles%7Cext.translate.tag.languages%7Cext.uls.pt%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.visualEditor.diffPage.init.styles%7Cext.wikimediamessages.styles%7Cmediawiki.diff.styles%7Cmediawiki.helplink%7Cmediawiki.interface.helpers.styles%7Cmediawiki.widgets.styles%7Coojs-ui-core.icons%2Cstyles%7Coojs-ui.styles.icons-accessibility%2Cicons-editing-advanced%2Cindicators%7Cskins.vector.icons%2Cstyles%7Cskins.vector.search.codex.styles%7Cwikibase.client.init&only=styles&skin=vector-2022"> <script async="" src="/w/load.php?lang=en&modules=startup&only=scripts&raw=1&skin=vector-2022"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=en&modules=site.styles&only=styles&skin=vector-2022"> <meta name="generator" content="MediaWiki 1.44.0-wmf.5"> <meta name="referrer" content="origin"> <meta name="referrer" content="origin-when-cross-origin"> <meta name="robots" content="noindex,nofollow,max-image-preview:standard"> <meta name="format-detection" content="telephone=no"> <meta name="viewport" content="width=1120"> <meta property="og:site_name" content="MediaWiki"> <meta property="og:title" content="Manual:How to debug: Difference between revisions - MediaWiki"> <meta property="og:type" content="website"> <link rel="preconnect" href="//upload.wikimedia.org"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//m.mediawiki.org/wiki/Manual:How_to_debug"> <link rel="apple-touch-icon" href="/static/apple-touch/mediawiki.png"> <link rel="icon" href="/static/favicon/mediawiki.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="MediaWiki (en)"> <link rel="EditURI" type="application/rsd+xml" href="//www.mediawiki.org/w/api.php?action=rsd"> <link rel="canonical" href="https://www.mediawiki.org/wiki/Manual:How_to_debug"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/"> <link rel="alternate" type="application/atom+xml" title="MediaWiki Atom feed" href="/w/index.php?title=Special:RecentChanges&feed=atom"> <link rel="dns-prefetch" href="//login.wikimedia.org"> </head> <body class="mw-article-diff skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-100 ns-subject page-Manual_How_to_debug rootpage-Manual_How_to_debug skin-vector-2022 action-view"><a class="mw-jump-link" href="#bodyContent">Jump to content</a> <div class="vector-header-container"> <header class="vector-header mw-header"> <div class="vector-header-start"> <nav class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-dropdown" class="vector-dropdown vector-main-menu-dropdown vector-button-flush-left vector-button-flush-right" > <input type="checkbox" id="vector-main-menu-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-main-menu-dropdown" class="vector-dropdown-checkbox " aria-label="Main menu" > <label id="vector-main-menu-dropdown-label" for="vector-main-menu-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-menu mw-ui-icon-wikimedia-menu"></span> <span class="vector-dropdown-label-text">Main menu</span> </label> <div class="vector-dropdown-content"> <div id="vector-main-menu-unpinned-container" class="vector-unpinned-container"> <div id="vector-main-menu" class="vector-main-menu vector-pinnable-element"> <div class="vector-pinnable-header vector-main-menu-pinnable-header vector-pinnable-header-unpinned" data-feature-name="main-menu-pinned" data-pinnable-element-id="vector-main-menu" data-pinned-container-id="vector-main-menu-pinned-container" data-unpinned-container-id="vector-main-menu-unpinned-container" > <div class="vector-pinnable-header-label">Main menu</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-main-menu.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-main-menu.unpin">hide</button> </div> <div id="p-navigation" class="vector-menu mw-portlet mw-portlet-navigation" > <div class="vector-menu-heading"> Navigation </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mainpage-description" class="mw-list-item"><a href="/wiki/MediaWiki" title="Visit the main page [z]" accesskey="z"><span>Main page</span></a></li><li id="n-mw-download" class="mw-list-item"><a href="/wiki/Download"><span>Get MediaWiki</span></a></li><li id="n-mw-extensions" class="mw-list-item"><a href="/wiki/Special:MyLanguage/Category:Extensions"><span>Get extensions</span></a></li><li id="n-blog-text" class="mw-list-item"><a href="https://techblog.wikimedia.org/"><span>Tech blog</span></a></li><li id="n-mw-contribute" class="mw-list-item"><a href="/wiki/Special:MyLanguage/How_to_contribute"><span>Contribute</span></a></li> </ul> </div> </div> <div id="p-support" class="vector-menu mw-portlet mw-portlet-support" > <div class="vector-menu-heading"> Support </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-help" class="mw-list-item"><a href="/wiki/Special:MyLanguage/Help:Contents" title="The place to find out"><span>User help</span></a></li><li id="n-mw-faq" class="mw-list-item"><a href="/wiki/Special:MyLanguage/Manual:FAQ"><span>FAQ</span></a></li><li id="n-mw-manual" class="mw-list-item"><a href="/wiki/Special:MyLanguage/Manual:Contents"><span>Technical manual</span></a></li><li id="n-mw-supportdesk" class="mw-list-item"><a href="/wiki/Project:Support_desk"><span>Support desk</span></a></li><li id="n-mw-communication" class="mw-list-item"><a href="/wiki/Special:MyLanguage/Communication"><span>Communication</span></a></li> </ul> </div> </div> <div id="p-development" class="vector-menu mw-portlet mw-portlet-development" > <div class="vector-menu-heading"> Development </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mw-developerportal" class="mw-list-item"><a href="https://developer.wikimedia.org/"><span>Developer portal</span></a></li><li id="n-svn-statistics" class="mw-list-item"><a href="/wiki/Development_statistics"><span>Code statistics</span></a></li> </ul> </div> </div> <div id="p-mediawiki.org" class="vector-menu mw-portlet mw-portlet-mediawiki_org" > <div class="vector-menu-heading"> mediawiki.org </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-portal" class="mw-list-item"><a href="/wiki/Project:Help" title="About the project, what you can do, where to find things"><span>Community portal</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/wiki/Special:RecentChanges" title="A list of recent changes in the wiki [r]" accesskey="r"><span>Recent changes</span></a></li><li id="n-mw-translate" class="mw-list-item"><a href="/wiki/Special:LanguageStats"><span>Translate content</span></a></li><li id="n-randompage" class="mw-list-item"><a href="/wiki/Special:Random" title="Load a random page [x]" accesskey="x"><span>Random page</span></a></li><li id="n-mw-discussion" class="mw-list-item"><a href="/wiki/Project:Village_Pump"><span>Village pump</span></a></li><li id="n-Sandboxlink-portlet-label" class="mw-list-item"><a href="/wiki/Project:Sandbox"><span>Sandbox</span></a></li> </ul> </div> </div> <div id="p-lang" class="vector-menu mw-portlet mw-portlet-lang" > <div class="vector-menu-heading"> In other languages </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> <div class="after-portlet after-portlet-lang"><span class="wb-langlinks-add wb-langlinks-link"><a href="https://www.wikidata.org/wiki/Special:NewItem?site=mediawikiwiki&page=Manual%3AHow+to+debug" title="Add interlanguage links" class="wbc-editpage">Add links</a></span></div> </div> </div> </div> </div> </div> </div> </nav> <a href="/wiki/MediaWiki" class="mw-logo"> <img class="mw-logo-icon" src="/static/images/icons/mediawikiwiki.svg" alt="" aria-hidden="true" height="50" width="50"> <span class="mw-logo-container skin-invert"> <img class="mw-logo-wordmark" alt="MediaWiki" src="/static/images/mobile/copyright/mediawikiwiki-wordmark.svg" style="width: 7.5em; height: 1.125em;"> </span> </a> </div> <div class="vector-header-end"> <div id="p-search" role="search" class="vector-search-box-vue vector-search-box-collapses vector-search-box-show-thumbnail vector-search-box-auto-expand-width vector-search-box"> <a href="/wiki/Special:Search" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only search-toggle" title="Search MediaWiki [f]" accesskey="f"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>Search</span> </a> <div class="vector-typeahead-search-container"> <div class="cdx-typeahead-search cdx-typeahead-search--show-thumbnail cdx-typeahead-search--auto-expand-width"> <form action="/w/index.php" id="searchform" class="cdx-search-input cdx-search-input--has-end-button"> <div id="simpleSearch" class="cdx-search-input__input-wrapper" data-search-loc="header-moved"> <div class="cdx-text-input cdx-text-input--has-start-icon"> <input class="cdx-text-input__input" type="search" name="search" placeholder="Search MediaWiki" aria-label="Search MediaWiki" autocapitalize="sentences" title="Search MediaWiki [f]" accesskey="f" id="searchInput" > <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Special:Search"> </div> <button class="cdx-button cdx-search-input__end-button">Search</button> </form> </div> </div> </div> <nav class="vector-user-links vector-user-links-wide" aria-label="Personal tools"> <div class="vector-user-links-main"> <div id="p-vector-user-menu-preferences" class="vector-menu mw-portlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-uls" class="mw-list-item active user-links-collapsible-item"><a data-mw="interface" href="#" class="uls-trigger cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet"><span class="vector-icon mw-ui-icon-wikimedia-language mw-ui-icon-wikimedia-wikimedia-language"></span> <span>English</span></a> </li> </ul> </div> </div> <div id="p-vector-user-menu-userpage" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-dropdown" class="vector-dropdown " title="Change the appearance of the page's font size, width, and color" > <input type="checkbox" id="vector-appearance-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-appearance-dropdown" class="vector-dropdown-checkbox " aria-label="Appearance" > <label id="vector-appearance-dropdown-label" for="vector-appearance-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-appearance mw-ui-icon-wikimedia-appearance"></span> <span class="vector-dropdown-label-text">Appearance</span> </label> <div class="vector-dropdown-content"> <div id="vector-appearance-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <div id="p-vector-user-menu-notifications" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-overflow" class="vector-menu mw-portlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="https://donate.wikimedia.org/?wmf_source=donate&wmf_medium=sidebar&wmf_campaign=www.mediawiki.org&uselang=en" class=""><span>Donate</span></a> </li> <li id="pt-createaccount-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:CreateAccount&returnto=Manual%3AHow+to+debug&returntoquery=diff%3Dprev%26oldid%3D6871907" title="You are encouraged to create an account and log in; however, it is not mandatory" class=""><span>Create account</span></a> </li> <li id="pt-login-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:UserLogin&returnto=Manual%3AHow+to+debug&returntoquery=diff%3Dprev%26oldid%3D6871907" title="You are encouraged to log in; however, it is not mandatory [o]" accesskey="o" class=""><span>Log in</span></a> </li> </ul> </div> </div> </div> <div id="vector-user-links-dropdown" class="vector-dropdown vector-user-menu vector-button-flush-right vector-user-menu-logged-out" title="More options" > <input type="checkbox" id="vector-user-links-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-user-links-dropdown" class="vector-dropdown-checkbox " aria-label="Personal tools" > <label id="vector-user-links-dropdown-label" for="vector-user-links-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-ellipsis mw-ui-icon-wikimedia-ellipsis"></span> <span class="vector-dropdown-label-text">Personal tools</span> </label> <div class="vector-dropdown-content"> <div id="p-personal" class="vector-menu mw-portlet mw-portlet-personal user-links-collapsible-item" title="User menu" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport" class="user-links-collapsible-item mw-list-item"><a href="https://donate.wikimedia.org/?wmf_source=donate&wmf_medium=sidebar&wmf_campaign=www.mediawiki.org&uselang=en"><span>Donate</span></a></li><li id="pt-createaccount" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:CreateAccount&returnto=Manual%3AHow+to+debug&returntoquery=diff%3Dprev%26oldid%3D6871907" title="You are encouraged to create an account and log in; however, it is not mandatory"><span class="vector-icon mw-ui-icon-userAdd mw-ui-icon-wikimedia-userAdd"></span> <span>Create account</span></a></li><li id="pt-login" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:UserLogin&returnto=Manual%3AHow+to+debug&returntoquery=diff%3Dprev%26oldid%3D6871907" title="You are encouraged to log in; however, it is not mandatory [o]" accesskey="o"><span class="vector-icon mw-ui-icon-logIn mw-ui-icon-wikimedia-logIn"></span> <span>Log in</span></a></li> </ul> </div> </div> <div id="p-user-menu-anon-editor" class="vector-menu mw-portlet mw-portlet-user-menu-anon-editor" > <div class="vector-menu-heading"> Pages for logged out editors <a href="/wiki/Help:Introduction" aria-label="Learn more about editing"><span>learn more</span></a> </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-anoncontribs" class="mw-list-item"><a href="/wiki/Special:MyContributions" title="A list of edits made from this IP address [y]" accesskey="y"><span>Contributions</span></a></li><li id="pt-anontalk" class="mw-list-item"><a href="/wiki/Special:MyTalk" title="Discussion about edits from this IP address [n]" accesskey="n"><span>Talk</span></a></li> </ul> </div> </div> </div> </div> </nav> </div> </header> </div> <div class="mw-page-container"> <div class="mw-page-container-inner"> <div class="vector-sitenotice-container"> <div id="siteNotice"><!-- CentralNotice --></div> </div> <div class="vector-column-start"> <div class="vector-main-menu-container"> <div id="mw-navigation"> <nav id="mw-panel" class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-pinned-container" class="vector-pinned-container"> </div> </nav> </div> </div> <div class="vector-sticky-pinned-container"> <nav id="mw-panel-toc" aria-label="Contents" data-event-name="ui.sidebar-toc" class="mw-table-of-contents-container vector-toc-landmark"> <div id="vector-toc-pinned-container" class="vector-pinned-container"> <div id="vector-toc" class="vector-toc vector-pinnable-element"> <div class="vector-pinnable-header vector-toc-pinnable-header vector-pinnable-header-pinned" data-feature-name="toc-pinned" data-pinnable-element-id="vector-toc" > <h2 class="vector-pinnable-header-label">Contents</h2> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-toc.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-toc.unpin">hide</button> </div> <ul class="vector-toc-contents" id="mw-panel-toc-list"> <li id="toc-mw-content-text" class="vector-toc-list-item vector-toc-level-1"> <a href="#" class="vector-toc-link"> <div class="vector-toc-text">Beginning</div> </a> </li> <li id="toc-PHP_errors" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#PHP_errors"> <div class="vector-toc-text"> <span class="vector-toc-numb">1</span> <span>PHP errors</span> </div> </a> <button aria-controls="toc-PHP_errors-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Toggle PHP errors subsection</span> </button> <ul id="toc-PHP_errors-sublist" class="vector-toc-list"> <li id="toc-Turning_display_startup_errors_on" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Turning_display_startup_errors_on"> <div class="vector-toc-text"> <span class="vector-toc-numb">1.1</span> <span>Turning display_startup_errors on</span> </div> </a> <ul id="toc-Turning_display_startup_errors_on-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-SQL_errors" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#SQL_errors"> <div class="vector-toc-text"> <span class="vector-toc-numb">2</span> <span>SQL errors</span> </div> </a> <ul id="toc-SQL_errors-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-In-depth_debugging" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#In-depth_debugging"> <div class="vector-toc-text"> <span class="vector-toc-numb">3</span> <span>In-depth debugging</span> </div> </a> <button aria-controls="toc-In-depth_debugging-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Toggle In-depth debugging subsection</span> </button> <ul id="toc-In-depth_debugging-sublist" class="vector-toc-list"> <li id="toc-Debugger" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Debugger"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.1</span> <span>Debugger</span> </div> </a> <ul id="toc-Debugger-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Logging" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Logging"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.2</span> <span>Logging</span> </div> </a> <ul id="toc-Logging-sublist" class="vector-toc-list"> <li id="toc-Setting_up_a_debug_log_file" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Setting_up_a_debug_log_file"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.2.1</span> <span>Setting up a debug log file</span> </div> </a> <ul id="toc-Setting_up_a_debug_log_file-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Creating_custom_log_groups" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Creating_custom_log_groups"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.2.2</span> <span>Creating custom log groups</span> </div> </a> <ul id="toc-Creating_custom_log_groups-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Structured_logging" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Structured_logging"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.2.3</span> <span>Structured logging</span> </div> </a> <ul id="toc-Structured_logging-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-JavaScript_error_logging" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#JavaScript_error_logging"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.2.4</span> <span>JavaScript error logging</span> </div> </a> <ul id="toc-JavaScript_error_logging-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Statistics" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Statistics"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.3</span> <span>Statistics</span> </div> </a> <ul id="toc-Statistics-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Send_debug_data_to_an_HTML_comment_in_the_output" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Send_debug_data_to_an_HTML_comment_in_the_output"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.4</span> <span>Send debug data to an HTML comment in the output</span> </div> </a> <ul id="toc-Send_debug_data_to_an_HTML_comment_in_the_output-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Working_live_with_MediaWiki_objects" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Working_live_with_MediaWiki_objects"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.5</span> <span>Working live with MediaWiki objects</span> </div> </a> <ul id="toc-Working_live_with_MediaWiki_objects-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Callable_updates" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Callable_updates"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.6</span> <span>Callable updates</span> </div> </a> <ul id="toc-Callable_updates-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Interactive_shell" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Interactive_shell"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.7</span> <span>Interactive shell</span> </div> </a> <ul id="toc-Interactive_shell-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Client_side_debugging_(JavaScript)" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Client_side_debugging_(JavaScript)"> <div class="vector-toc-text"> <span class="vector-toc-numb">4</span> <span>Client side debugging (JavaScript)</span> </div> </a> <ul id="toc-Client_side_debugging_(JavaScript)-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-See_also" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#See_also"> <div class="vector-toc-text"> <span class="vector-toc-numb">5</span> <span>See also</span> </div> </a> <ul id="toc-See_also-sublist" class="vector-toc-list"> </ul> </li> </ul> </div> </div> </nav> </div> </div> <div class="mw-content-container"> <main id="content" class="mw-body"> <header class="mw-body-header vector-page-titlebar"> <nav aria-label="Contents" class="vector-toc-landmark"> <div id="vector-page-titlebar-toc" class="vector-dropdown vector-page-titlebar-toc vector-button-flush-left" > <input type="checkbox" id="vector-page-titlebar-toc-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-titlebar-toc" class="vector-dropdown-checkbox " aria-label="Toggle the table of contents" > <label id="vector-page-titlebar-toc-label" for="vector-page-titlebar-toc-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-listBullet mw-ui-icon-wikimedia-listBullet"></span> <span class="vector-dropdown-label-text">Toggle the table of contents</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-titlebar-toc-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <h1 id="firstHeading" class="firstHeading mw-first-heading">Manual:How to debug: Difference between revisions</h1> <div class="mw-indicators"> <div id="mw-indicator-mw-helplink" class="mw-indicator"><a href="https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Diff" target="_blank" class="mw-helplink"><span class="mw-helplink-icon"></span>Help</a></div> </div> </header> <div class="vector-page-toolbar"> <div class="vector-page-toolbar-container"> <div id="left-navigation"> <nav aria-label="Namespaces"> <div id="p-associated-pages" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-associated-pages" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-nstab-manual" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/Manual:How_to_debug" title="View the subject page [c]" accesskey="c"><span>Manual</span></a></li><li id="ca-talk" class="vector-tab-noicon mw-list-item"><a href="/wiki/Manual_talk:How_to_debug" rel="discussion" title="Discussion about the content page [t]" accesskey="t"><span>Discussion</span></a></li> </ul> </div> </div> <div id="vector-variants-dropdown" class="vector-dropdown emptyPortlet" > <input type="checkbox" id="vector-variants-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-variants-dropdown" class="vector-dropdown-checkbox " aria-label="Change language variant" > <label id="vector-variants-dropdown-label" for="vector-variants-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">English</span> </label> <div class="vector-dropdown-content"> <div id="p-variants" class="vector-menu mw-portlet mw-portlet-variants emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> </div> </div> </nav> </div> <div id="right-navigation" class="vector-collapsible"> <nav aria-label="Views"> <div id="p-views" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-views" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-view" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/Manual:How_to_debug"><span>Read</span></a></li><li id="ca-viewsource" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Manual:How_to_debug&action=edit" title="This page is protected. You can view its source [e]" accesskey="e"><span>View source</span></a></li><li id="ca-history" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Manual:How_to_debug&action=history" title="Past revisions of this page [h]" accesskey="h"><span>View history</span></a></li> </ul> </div> </div> </nav> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-dropdown" class="vector-dropdown vector-page-tools-dropdown" > <input type="checkbox" id="vector-page-tools-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-tools-dropdown" class="vector-dropdown-checkbox " aria-label="Tools" > <label id="vector-page-tools-dropdown-label" for="vector-page-tools-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">Tools</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-tools-unpinned-container" class="vector-unpinned-container"> <div id="vector-page-tools" class="vector-page-tools vector-pinnable-element"> <div class="vector-pinnable-header vector-page-tools-pinnable-header vector-pinnable-header-unpinned" data-feature-name="page-tools-pinned" data-pinnable-element-id="vector-page-tools" data-pinned-container-id="vector-page-tools-pinned-container" data-unpinned-container-id="vector-page-tools-unpinned-container" > <div class="vector-pinnable-header-label">Tools</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-page-tools.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-page-tools.unpin">hide</button> </div> <div id="p-cactions" class="vector-menu mw-portlet mw-portlet-cactions emptyPortlet vector-has-collapsible-items" title="More options" > <div class="vector-menu-heading"> Actions </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-more-view" class="selected vector-more-collapsible-item mw-list-item"><a href="/wiki/Manual:How_to_debug"><span>Read</span></a></li><li id="ca-more-viewsource" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Manual:How_to_debug&action=edit"><span>View source</span></a></li><li id="ca-more-history" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Manual:How_to_debug&action=history"><span>View history</span></a></li> </ul> </div> </div> <div id="p-tb" class="vector-menu mw-portlet mw-portlet-tb" > <div class="vector-menu-heading"> General </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-whatlinkshere" class="mw-list-item"><a href="/wiki/Special:WhatLinksHere/Manual:How_to_debug" title="A list of all wiki pages that link here [j]" accesskey="j"><span>What links here</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/wiki/Special:RecentChangesLinked/Manual:How_to_debug" rel="nofollow" title="Recent changes in pages linked from this page [k]" accesskey="k"><span>Related changes</span></a></li><li id="t-upload" class="mw-list-item"><a href="//commons.wikimedia.org/wiki/Special:UploadWizard" title="Upload files [u]" accesskey="u"><span>Upload file</span></a></li><li id="t-specialpages" class="mw-list-item"><a href="/wiki/Special:SpecialPages" title="A list of all special pages [q]" accesskey="q"><span>Special pages</span></a></li><li id="t-permalink" class="mw-list-item"><a href="/w/index.php?title=Manual:How_to_debug&oldid=6871907" title="Permanent link to this revision of this page"><span>Permanent link</span></a></li><li id="t-info" class="mw-list-item"><a href="/w/index.php?title=Manual:How_to_debug&action=info" title="More information about this page"><span>Page information</span></a></li><li id="t-cite" class="mw-list-item"><a href="/w/index.php?title=Special:CiteThisPage&page=Manual%3AHow_to_debug&id=6871907&wpFormIdentifier=titleform" title="Information on how to cite this page"><span>Cite this page</span></a></li><li id="t-urlshortener" class="mw-list-item"><a href="/w/index.php?title=Special:UrlShortener&url=https%3A%2F%2Fwww.mediawiki.org%2Fw%2Findex.php%3Ftitle%3DManual%3AHow_to_debug%26diff%3Dprev%26oldid%3D6871907"><span>Get shortened URL</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=Special:QrCode&url=https%3A%2F%2Fwww.mediawiki.org%2Fw%2Findex.php%3Ftitle%3DManual%3AHow_to_debug%26diff%3Dprev%26oldid%3D6871907"><span>Download QR code</span></a></li> </ul> </div> </div> <div id="p-coll-print_export" class="vector-menu mw-portlet mw-portlet-coll-print_export" > <div class="vector-menu-heading"> Print/export </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="coll-create_a_book" class="mw-list-item"><a href="/w/index.php?title=Special:Book&bookcmd=book_creator&referer=Manual%3AHow+to+debug"><span>Create a book</span></a></li><li id="coll-download-as-rl" class="mw-list-item"><a href="/w/index.php?title=Special:DownloadAsPdf&page=Manual%3AHow_to_debug&action=show-download-screen"><span>Download as PDF</span></a></li><li id="t-print" class="mw-list-item"><a href="/w/index.php?title=Manual:How_to_debug&printable=yes" title="Printable version of this page [p]" accesskey="p"><span>Printable version</span></a></li> </ul> </div> </div> <div id="p-wikibase-otherprojects" class="vector-menu mw-portlet mw-portlet-wikibase-otherprojects emptyPortlet" > <div class="vector-menu-heading"> In other projects </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> </div> </div> </div> </div> </nav> </div> </div> </div> <div class="vector-column-end"> <div class="vector-sticky-pinned-container"> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-pinned-container" class="vector-pinned-container"> </div> </nav> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-pinned-container" class="vector-pinned-container"> <div id="vector-appearance" class="vector-appearance vector-pinnable-element"> <div class="vector-pinnable-header vector-appearance-pinnable-header vector-pinnable-header-pinned" data-feature-name="appearance-pinned" data-pinnable-element-id="vector-appearance" data-pinned-container-id="vector-appearance-pinned-container" data-unpinned-container-id="vector-appearance-unpinned-container" > <div class="vector-pinnable-header-label">Appearance</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-appearance.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-appearance.unpin">hide</button> </div> </div> </div> </nav> </div> </div> <div id="bodyContent" class="vector-body" aria-labelledby="firstHeading" data-mw-ve-target-container> <div class="vector-body-before-content"> <div id="siteSub" class="noprint">From mediawiki.org</div> </div> <div id="contentSub"><div id="mw-content-subtitle"></div></div> <div id="mw-content-text" class="mw-body-content"><div class="mw-revslider-container"><span style='width: 100%; text-align: center;' id='ooui-php-1' class='mw-revslider-toggle-button oo-ui-widget oo-ui-widget-enabled oo-ui-buttonElement oo-ui-buttonElement-frameless oo-ui-indicatorElement oo-ui-labelElement oo-ui-buttonWidget' data-ooui='{"_":"OO.ui.ButtonWidget","rel":["nofollow"],"framed":false,"indicator":"down","label":"Browse history interactively","title":"Open revision slider","classes":["mw-revslider-toggle-button"]}'><a role='button' title='Open revision slider' tabindex='0' rel='nofollow' class='oo-ui-buttonElement-button'><span class='oo-ui-iconElement-icon oo-ui-iconElement-noIcon'></span><span class='oo-ui-labelElement-label'>Browse history interactively</span><span class='oo-ui-indicatorElement-indicator oo-ui-indicator-down'></span></a></span><div class="mw-revslider-slider-wrapper" style="display: none;"><div class="mw-revslider-placeholder"><div class="mw-revslider-spinner"><div class="mw-revslider-bounce"></div></div></div></div></div><div class="mw-diff-revision-history-links"><a href="/w/index.php?title=Manual:How_to_debug&diff=prev&oldid=6871906" class="mw-diff-revision-history-link-previous" title="Manual:How to debug">← Older edit</a></div><div class="mw-diff-table-prefix" dir="ltr" lang="en"><div class="mw-diff-inline-legend oo-ui-element-hidden"><span class="mw-diff-inline-legend-del">Content deleted</span> <span class="mw-diff-inline-legend-ins">Content added</span></div><div class="ve-init-mw-diffPage-diffMode"><span class='oo-ui-widget oo-ui-widget-enabled oo-ui-buttonGroupWidget'><span aria-disabled='true' class='oo-ui-widget oo-ui-widget-disabled oo-ui-buttonElement oo-ui-buttonElement-framed oo-ui-iconElement oo-ui-labelElement oo-ui-buttonWidget'><a role='button' tabindex='-1' aria-disabled='true' rel='nofollow' class='oo-ui-buttonElement-button'><span class='oo-ui-iconElement-icon oo-ui-icon-eye oo-ui-image-invert'></span><span class='oo-ui-labelElement-label'>Visual</span><span class='oo-ui-indicatorElement-indicator oo-ui-indicatorElement-noIndicator oo-ui-image-invert'></span></a></span><span class='oo-ui-widget oo-ui-widget-enabled oo-ui-buttonElement oo-ui-buttonElement-framed oo-ui-iconElement oo-ui-labelElement oo-ui-buttonWidget oo-ui-buttonElement-active'><a role='button' tabindex='0' rel='nofollow' class='oo-ui-buttonElement-button'><span class='oo-ui-iconElement-icon oo-ui-icon-wikiText oo-ui-image-invert'></span><span class='oo-ui-labelElement-label'>Wikitext</span><span class='oo-ui-indicatorElement-indicator oo-ui-indicatorElement-noIndicator oo-ui-image-invert'></span></a></span></span></div><div class="mw-diffPage-inlineToggle-container"><div id='mw-diffPage-inline-toggle-switch-layout' class='oo-ui-layout oo-ui-labelElement oo-ui-fieldLayout oo-ui-fieldLayout-align-left' data-ooui='{"_":"OO.ui.FieldLayout","fieldWidget":{"tag":"mw-diffPage-inline-toggle-switch"},"$overlay":true,"label":"Inline","title":"Switches between inline format and two-column format"}'><div class='oo-ui-fieldLayout-body'><span class='oo-ui-fieldLayout-header'><label title='Switches between inline format and two-column format' id='ooui-php-2' class='oo-ui-labelElement-label'>Inline</label></span><div class='oo-ui-fieldLayout-field'><div id='mw-diffPage-inline-toggle-switch' title='Switches between inline format and two-column format' aria-checked='false' tabindex='0' role='switch' aria-labelledby='ooui-php-2' class='oo-ui-widget oo-ui-widget-enabled oo-ui-toggleWidget oo-ui-toggleWidget-off oo-ui-toggleSwitchWidget' data-ooui='{"_":"OO.ui.ToggleSwitchWidget","href":"\/w\/index.php?title=Manual:How_to_debug&diff=prev&oldid=6871907&diff-type=inline","value":false,"title":"Switches between inline format and two-column format"}'><span class='oo-ui-toggleSwitchWidget-glow'></span><a href='/w/index.php?title=Manual:How_to_debug&diff=prev&oldid=6871907&diff-type=inline'><span class='oo-ui-toggleSwitchWidget-grip'></span></a></div></div></div></div></div></div><table class="diff diff-type-table diff-contentalign-left diff-editfont-monospace" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="en"> <td colspan="2" class="diff-otitle diff-side-deleted"><div id="mw-diff-otitle1"><strong><a href="/w/index.php?title=Manual:How_to_debug&oldid=6871906" title="Manual:How to debug">Revision as of 18:45, 27 November 2024</a> <span class="mw-diff-edit"><a href="/w/index.php?title=Manual:How_to_debug&action=edit&oldid=6871906" title="Manual:How to debug">view source</a></span><span class="mw-diff-timestamp" data-timestamp="2024-11-27T18:45:34Z"></span></strong></div><div id="mw-diff-otitle2"><a href="/wiki/User:Pppery" class="mw-userlink" title="User:Pppery" data-mw-revid="6871906"><bdi>Pppery</bdi></a> <span class="mw-usertoollinks">(<a href="/wiki/User_talk:Pppery" class="mw-usertoollinks-talk" title="User talk:Pppery">talk</a> | <a href="/wiki/Special:Contributions/Pppery" class="mw-usertoollinks-contribs" title="Special:Contributions/Pppery">contribs</a>)</span><div class="mw-diff-usermetadata"><div class="mw-diff-userroles"><a href="/wiki/Project:Bureaucrats" title="Project:Bureaucrats">Bureaucrats</a>, <a href="/wiki/Project:Interface_administrators" title="Project:Interface administrators">Interface administrators</a>, <a href="/wiki/Project:Administrators" title="Project:Administrators">Administrators</a>, <a href="/wiki/Project:Translation_administrators" class="mw-redirect" title="Project:Translation administrators">Translation administrators</a></div><div class="mw-diff-usereditcount"><span>20,071</span> edits</div></div></div><div id="mw-diff-otitle3"> <span class="comment comment--without-parentheses">...</span></div><div id="mw-diff-otitle5"></div><div id="mw-diff-otitle4"><a href="/w/index.php?title=Manual:How_to_debug&diff=prev&oldid=6871906" title="Manual:How to debug" id="differences-prevlink">← Older edit</a></div></td> <td colspan="2" class="diff-ntitle diff-side-added"><div id="mw-diff-ntitle1"><strong><a href="/w/index.php?title=Manual:How_to_debug&oldid=6871907" title="Manual:How to debug">Latest revision as of 18:45, 27 November 2024</a> <span class="mw-diff-edit"><a href="/w/index.php?title=Manual:How_to_debug&action=edit" title="Manual:How to debug">view source</a></span><span class="mw-diff-timestamp" data-timestamp="2024-11-27T18:45:55Z"></span> </strong></div><div id="mw-diff-ntitle2"><a href="/wiki/User:Pppery" class="mw-userlink" title="User:Pppery" data-mw-revid="6871907"><bdi>Pppery</bdi></a> <span class="mw-usertoollinks">(<a href="/wiki/User_talk:Pppery" class="mw-usertoollinks-talk" title="User talk:Pppery">talk</a> | <a href="/wiki/Special:Contributions/Pppery" class="mw-usertoollinks-contribs" title="Special:Contributions/Pppery">contribs</a>)</span><div class="mw-diff-usermetadata"><div class="mw-diff-userroles"><a href="/wiki/Project:Bureaucrats" title="Project:Bureaucrats">Bureaucrats</a>, <a href="/wiki/Project:Interface_administrators" title="Project:Interface administrators">Interface administrators</a>, <a href="/wiki/Project:Administrators" title="Project:Administrators">Administrators</a>, <a href="/wiki/Project:Translation_administrators" class="mw-redirect" title="Project:Translation administrators">Translation administrators</a></div><div class="mw-diff-usereditcount"><span>20,071</span> edits</div></div></div><div id="mw-diff-ntitle3"> <span class="comment comment--without-parentheses">...</span></div><div id="mw-diff-ntitle5"></div><div id="mw-diff-ntitle4"> </div></td> </tr><tr> <td colspan="2" class="diff-lineno">Line 179:</td> <td colspan="2" class="diff-lineno">Line 179:</td> </tr> <tr> <td class="diff-marker"></td> <td class="diff-context diff-side-deleted"><br /></td> <td class="diff-marker"></td> <td class="diff-context diff-side-added"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td class="diff-context diff-side-deleted"><div>{{warning|1=<translate><!--T:27--> The debug log file can contain private information such as login credentials, session cookies, and values of submitted forms. If this information is publicly accessible, attackers can use it to hack and compromise your machine and user account. If you need to share a debug log for diagnostic purposes, access the wiki without being logged in, and remove from the debug log any COOKIE lines, and don't capture any login attempt.</translate>}}</div></td> <td class="diff-marker"></td> <td class="diff-context diff-side-added"><div>{{warning|1=<translate><!--T:27--> The debug log file can contain private information such as login credentials, session cookies, and values of submitted forms. If this information is publicly accessible, attackers can use it to hack and compromise your machine and user account. If you need to share a debug log for diagnostic purposes, access the wiki without being logged in, and remove from the debug log any COOKIE lines, and don't capture any login attempt.</translate>}}</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td class="diff-deletedline diff-side-deleted"><br /></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td class="diff-deletedline diff-side-deleted"><div><translate></div></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td class="diff-deletedline diff-side-deleted"><div>==== Creating a custom log file ==== <!--T:28--></div></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td class="diff-deletedline diff-side-deleted"><div></translate></div></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td class="diff-deletedline diff-side-deleted"><div>{{MW 1.31|and before}}</div></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td class="diff-deletedline diff-side-deleted"><div><translate><!--T:29--> Prior to MediaWiki 1.32, to create a custom log file that only holds your specific debug statements, use the <tvar name=1><code>wfErrorLog()</code></tvar> function.</translate></div></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td class="diff-deletedline diff-side-deleted"><div><translate><!--T:100--> This function takes two arguments, the text string to log and the path to the log file:</translate></div></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td class="diff-deletedline diff-side-deleted"><br /></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td class="diff-deletedline diff-side-deleted"><div><syntaxhighlight lang="php"></div></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td class="diff-deletedline diff-side-deleted"><div>wfErrorLog( "An error occurred.\n", '/var/log/mediawiki/my-custom-debug.log' );</div></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td class="diff-deletedline diff-side-deleted"><div></syntaxhighlight></div></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td class="diff-marker"></td> <td class="diff-context diff-side-deleted"><br /></td> <td class="diff-marker"></td> <td class="diff-context diff-side-added"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td class="diff-context diff-side-deleted"><div><translate></div></td> <td class="diff-marker"></td> <td class="diff-context diff-side-added"><div><translate></div></td> </tr> </table><hr class='diff-hr' id='mw-oldid' /> <h2 class='diff-currentversion-title'>Latest revision as of 18:45, 27 November 2024</h2> <div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr"><div class="mw-pt-languages noprint navigation-not-searchable" lang="en" dir="ltr"><div class="mw-pt-languages-label">Languages:</div><ul class="mw-pt-languages-list"><li><a href="/wiki/Manual:How_to_debug/id" class="mw-pt-progress mw-pt-progress--med" title="Manual:Cara mengawakekutu (37% translated)" lang="id" dir="ltr">Bahasa Indonesia</a></li> <li><a href="/wiki/Manual:How_to_debug/ms" class="mw-pt-progress mw-pt-progress--low" title="Manual:Cara mengawakekutu (1% translated)" lang="ms" dir="ltr">Bahasa Melayu</a></li> <li><a href="/wiki/Manual:How_to_debug/de" class="mw-pt-progress mw-pt-progress--med" title="Handbuch:Wie man debuggt (61% translated)" lang="de" dir="ltr">Deutsch</a></li> <li><span class="mw-pt-languages-ui mw-pt-languages-selected mw-pt-progress mw-pt-progress--complete" lang="en" dir="ltr">English</span></li> <li><a href="/wiki/Manual:How_to_debug/nl" class="mw-pt-progress mw-pt-progress--complete" title="Handleiding:Hoe te debuggen (100% translated)" lang="nl" dir="ltr">Nederlands</a></li> <li><a href="/wiki/Manual:How_to_debug/da" class="mw-pt-progress mw-pt-progress--low" title="Manual:How to debug/da (11% translated)" lang="da" dir="ltr">dansk</a></li> <li><a href="/wiki/Manual:How_to_debug/es" class="mw-pt-progress mw-pt-progress--med" title="Manual:Cómo depurar (40% translated)" lang="es" dir="ltr">español</a></li> <li><a href="/wiki/Manual:How_to_debug/fr" class="mw-pt-progress mw-pt-progress--high" title="Comment déboguer (99% translated)" lang="fr" dir="ltr">français</a></li> <li><a href="/wiki/Manual:How_to_debug/hu" class="mw-pt-progress mw-pt-progress--med" title="Kézikönyv:Hibakeresés (15% translated)" lang="hu" dir="ltr">magyar</a></li> <li><a href="/wiki/Manual:How_to_debug/pl" class="mw-pt-progress mw-pt-progress--low" title="Podręcznik:Jak debugować (9% translated)" lang="pl" dir="ltr">polski</a></li> <li><a href="/wiki/Manual:How_to_debug/pt-br" class="mw-pt-progress mw-pt-progress--med" title="Manual:Como depurar (18% translated)" lang="pt-BR" dir="ltr">português do Brasil</a></li> <li><a href="/wiki/Manual:How_to_debug/sv" class="mw-pt-progress mw-pt-progress--low" title="Manual:Hur man felsöker (8% translated)" lang="sv" dir="ltr">svenska</a></li> <li><a href="/wiki/Manual:How_to_debug/cs" class="mw-pt-progress mw-pt-progress--high" title="Příručka:Jak řešit chyby (99% translated)" lang="cs" dir="ltr">čeština</a></li> <li><a href="/wiki/Manual:How_to_debug/ru" class="mw-pt-progress mw-pt-progress--med" title="Руководство:Как отлаживать (17% translated)" lang="ru" dir="ltr">русский</a></li> <li><a href="/wiki/Manual:How_to_debug/gu" class="mw-pt-progress mw-pt-progress--low" title="Manual:How to debug/gu (1% translated)" lang="gu" dir="ltr">ગુજરાતી</a></li> <li><a href="/wiki/Manual:How_to_debug/zh" class="mw-pt-progress mw-pt-progress--high" title="手册:如何调试 (75% translated)" lang="zh" dir="ltr">中文</a></li> <li><a href="/wiki/Manual:How_to_debug/ja" class="mw-pt-progress mw-pt-progress--med" title="Manual:デバッグの方法 (31% translated)" lang="ja" dir="ltr">日本語</a></li></ul></div> <div style="margin-bottom: .5em; float: none; width: auto;"><meta property="mw:PageProp/toc" /></div> <p>This page gives a basic introduction to <b>debugging MediaWiki</b> software. </p><p>One of the first things you will notice is that "echo" generally does not work; this is part of the general design. </p><p>There are several configuration options to aid debugging. The following are all <code>false</code> by default. Enable them by setting them to <code>true</code> in your <a href="/wiki/Special:MyLanguage/Manual:LocalSettings.php" title="Special:MyLanguage/Manual:LocalSettings.php">LocalSettings.php</a><span style="display:none"><a href="/wiki/Manual:LocalSettings.php" title="Manual:LocalSettings.php"> </a></span>: </p> <ul><li><code><a href="/wiki/Special:MyLanguage/Manual:$wgShowExceptionDetails" title="Special:MyLanguage/Manual:$wgShowExceptionDetails">$wgShowExceptionDetails</a><span style="display:none"><a href="/wiki/Manual:$wgShowExceptionDetails" title="Manual:$wgShowExceptionDetails"> </a></span></code> Enable more details (like a stack trace) to be shown on the "Fatal error" page.</li> <li><code><a href="/wiki/Special:MyLanguage/Manual:$wgDebugToolbar" title="Special:MyLanguage/Manual:$wgDebugToolbar">$wgDebugToolbar</a><span style="display:none"><a href="/wiki/Manual:$wgDebugToolbar" title="Manual:$wgDebugToolbar"> </a></span></code> Shows a toolbar on the page with profiling, log messages and more.</li> <li><code><a href="/wiki/Special:MyLanguage/Manual:$wgShowDebug" title="Special:MyLanguage/Manual:$wgShowDebug">$wgShowDebug</a><span style="display:none"><a href="/wiki/Manual:$wgShowDebug" title="Manual:$wgShowDebug"> </a></span></code> Adds log messages as a raw list to the bottom of the page.</li> <li><code><a href="/wiki/Special:MyLanguage/Manual:$wgDevelopmentWarnings" title="Special:MyLanguage/Manual:$wgDevelopmentWarnings">$wgDevelopmentWarnings</a><span style="display:none"><a href="/wiki/Manual:$wgDevelopmentWarnings" title="Manual:$wgDevelopmentWarnings"> </a></span></code> MediaWiki will throw notices for some possible error conditions and for deprecated functions.</li></ul> <p>Example line to be added in your <a href="/wiki/Special:MyLanguage/Manual:LocalSettings.php" title="Special:MyLanguage/Manual:LocalSettings.php">LocalSettings.php</a><span style="display:none"><a href="/wiki/Manual:LocalSettings.php" title="Manual:LocalSettings.php"> </a></span>: </p> <div class="mw-highlight mw-highlight-lang-php mw-content-ltr" dir="ltr"><pre><span></span><span class="nv">$wgShowExceptionDetails</span> <span class="o">=</span> <span class="k">true</span><span class="p">;</span> </pre></div> <div class="mw-heading mw-heading2"><h2 id="PHP_errors">PHP errors</h2></div> <p>To see PHP errors, add this to the second line from the top (right below the <code class="mw-highlight mw-highlight-lang-php mw-content-ltr" style="" dir="ltr"><span class="cp"><?php</span></code>) of <a href="/wiki/Special:MyLanguage/Manual:LocalSettings.php" title="Special:MyLanguage/Manual:LocalSettings.php">LocalSettings.php</a><span style="display:none"><a href="/wiki/Manual:LocalSettings.php" title="Manual:LocalSettings.php"> </a></span>: </p> <div class="mw-highlight mw-highlight-lang-php mw-content-ltr" dir="ltr"><pre><span></span><span class="nb">error_reporting</span><span class="p">(</span> <span class="o">-</span><span class="mi">1</span> <span class="p">);</span> <span class="nb">ini_set</span><span class="p">(</span> <span class="s1">'display_errors'</span><span class="p">,</span> <span class="mi">1</span> <span class="p">);</span> </pre></div> <p>Or set it in <a href="/wiki/Special:MyLanguage/Manual:php.ini" title="Special:MyLanguage/Manual:php.ini">php.ini</a><span style="display:none"><a href="/wiki/Manual:Php.ini" title="Manual:Php.ini"> </a></span>: </p> <div class="mw-highlight mw-highlight-lang-ini mw-content-ltr" dir="ltr"><pre><span></span><span class="na">error_reporting</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">E_ALL</span> <span class="na">display_errors</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">On</span> </pre></div> <p>Or set in .htaccess: </p> <div class="mw-highlight mw-highlight-lang-apache mw-content-ltr" dir="ltr"><pre><span></span><span class="nb">php_value</span><span class="w"> </span>error_reporting<span class="w"> </span>-1 <span class="nb">php_flag</span><span class="w"> </span>display_errors<span class="w"> </span><span class="k">On</span> </pre></div> <p>This will cause PHP errors to be shown on-page. This might make it easier for attackers to find a way into your server, so disable it again when you have found the problem. </p><p>Note that <i>fatal</i> PHP errors may happen before the lines above are ever executed, or may prevent them from being shown. Fatal PHP errors are usually logged to Apache's error log – check the <code><a rel="nofollow" class="external text" href="https://php.net/error_log">error_log</a></code> setting in <code>php.ini</code> (or use <code><a rel="nofollow" class="external text" href="https://php.net/phpinfo">phpinfo()</a></code>). </p> <div class="mw-heading mw-heading3"><h3 id="Turning_display_startup_errors_on">Turning display_startup_errors on</h3></div> <p>Some providers turn <code>display_startup_errors</code> off, which hides the errors even if you raise the <code>error_reporting</code> level. Turning it on within the program is too late! Instead you'll have to create a wrapper file around your file. In the case of MediaWiki you can just add this on top of mediawiki/index.php: </p> <div class="mw-highlight mw-highlight-lang-php mw-content-ltr" dir="ltr"><pre><span></span><span class="o">---</span> <span class="nx">index</span><span class="o">.</span><span class="nx">php</span> <span class="nb">error_reporting</span><span class="p">(</span> <span class="o">-</span><span class="mi">1</span> <span class="p">);</span> <span class="nb">ini_set</span><span class="p">(</span> <span class="s1">'display_startup_errors'</span><span class="p">,</span> <span class="mi">1</span> <span class="p">);</span> <span class="nb">ini_set</span><span class="p">(</span> <span class="s1">'display_errors'</span><span class="p">,</span> <span class="mi">1</span> <span class="p">);</span> </pre></div> <p>In other environments: </p> <div class="mw-highlight mw-highlight-lang-php mw-content-ltr" dir="ltr"><pre><span></span><span class="o">---</span> <span class="nx">myTestFile</span><span class="o">.</span><span class="nx">php</span> <span class="nb">error_reporting</span><span class="p">(</span> <span class="o">-</span><span class="mi">1</span> <span class="p">);</span> <span class="nb">ini_set</span><span class="p">(</span> <span class="s1">'display_startup_errors'</span><span class="p">,</span> <span class="mi">1</span> <span class="p">);</span> <span class="nb">ini_set</span><span class="p">(</span> <span class="s1">'display_errors'</span><span class="p">,</span> <span class="mi">1</span> <span class="p">);</span> <span class="k">require</span> <span class="s1">'your_file.php'</span><span class="p">;</span> </pre></div> <div class="mw-heading mw-heading2"><h2 id="SQL_errors">SQL errors</h2></div> <p>To log all SQL queries, rather than just the one that raised the exception, set <a href="/wiki/Special:MyLanguage/Manual:$wgDebugDumpSql" title="Special:MyLanguage/Manual:$wgDebugDumpSql">$wgDebugDumpSql</a> in <code>LocalSettings.php</code>: </p> <div class="mw-highlight mw-highlight-lang-php mw-content-ltr" dir="ltr"><pre><span></span><span class="nv">$wgDebugDumpSql</span> <span class="o">=</span> <span class="k">true</span><span class="p">;</span> </pre></div> <p><br /> </p> <div class="mw-heading mw-heading2"><h2 id="In-depth_debugging">In-depth debugging</h2></div> <div class="mw-heading mw-heading3"><h3 id="Debugger">Debugger</h3></div> <p>You can debug your code step-by-step with <a href="/wiki/Special:MyLanguage/XDebug" title="Special:MyLanguage/XDebug">XDebug</a><span style="display:none"><a href="/wiki/XDebug" class="mw-redirect" title="XDebug"> </a></span>. For some common setups, see: </p> <ul><li><a href="/wiki/MediaWiki-Docker/Configuration_recipes/Xdebug" title="MediaWiki-Docker/Configuration recipes/Xdebug">MediaWiki-Docker</a></li> <li><a href="/wiki/Cli/guide/Docker-Development-Environment/MediaWiki#XDebug" title="Cli/guide/Docker-Development-Environment/MediaWiki">mwcli</a></li> <li><a href="/wiki/Manual:How_to_debug/with_MediaWiki-Vagrant_and_PHPStorm" title="Manual:How to debug/with MediaWiki-Vagrant and PHPStorm">Vagrant with PHPStorm</a></li> <li><a href="/wiki/MediaWiki-Vagrant/Advanced_usage#MediaWiki_debugging_using_Xdebug_and_an_IDE_in_your_host" title="MediaWiki-Vagrant/Advanced usage">Vagrant with other IDEs</a></li> <li><a href="/wiki/Manual:Running_MediaWiki_on_macOS#Setting_up_XDebug_with_PhpStorm" title="Manual:Running MediaWiki on macOS">MacOS</a></li> <li><a href="/wiki/Local_development_quickstart" title="Local development quickstart">Local dev quickstart (Linux, macOS, Windows) on bare metal</a></li></ul> <p>MediaWiki-Vagrant has <a class="external text" href="https://phabricator.wikimedia.org/diffusion/MWVA/browse/master/puppet/modules/php/manifests/remote_debug.pp;c377718dea960c5e9e7b3acc79893a5e3c14da01$27">built in settings</a> for this. If you're not using MediaWiki-Vagrant, but your setup is similar, you can reuse those values. In some cases (e.g. due to a firewall), you may have to use the IDE on the same machine as the web server. In this case, simply set: </p> <div class="mw-highlight mw-highlight-lang-ini mw-content-ltr" dir="ltr"><pre><span></span><span class="na">xdebug.remote_enable</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">1</span> <span class="na">xdebug.remote_host</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">'localhost'</span> </pre></div> <p>See the <a rel="nofollow" class="external text" href="https://xdebug.org/docs/remote">XDebug documentation</a> for more information. </p><p>To debug a command-line script (e.g. PHPUnit, or a maintenance script) on MediaWiki-Vagrant, use: </p> <div class="mw-highlight mw-highlight-lang-php mw-content-ltr" dir="ltr"><pre><span></span><span class="nx">xdebug_on</span><span class="p">;</span> <span class="nx">php</span> <span class="o">/</span><span class="nx">vagrant</span><span class="o">/</span><span class="nx">mediawiki</span><span class="o">/</span><span class="nx">path</span><span class="o">/</span><span class="nx">to</span><span class="o">/</span><span class="nx">script</span><span class="o">.</span><span class="nx">php</span> <span class="o">--</span><span class="nx">wiki</span><span class="o">=</span><span class="nx">wiki</span> <span class="p">;</span> <span class="nx">xdebug_off</span> </pre></div> <p>Adjust the script, parameters, and remote host (it should be the IP of the computer where your IP is, 10.0.2.2 should work for <a href="/wiki/MediaWiki-Vagrant" title="MediaWiki-Vagrant">MediaWiki-Vagrant</a>) as needed. </p> <div class="mw-heading mw-heading3"><h3 id="Logging">Logging</h3></div> <p>For much greater detail, you need to profile and log errors. </p> <style data-mw-deduplicate="TemplateStyles:r6651107">.mw-parser-output .note{background-position:left 7px top 50%;padding:0.5em 0.5em 0.5em 40px;margin:0.5em 0;overflow:hidden;background-color:#f8f9fa;color:#333;background-repeat:no-repeat;border:1px solid #ddd}.mw-parser-output .note-inline{display:inline-block;vertical-align:middle}.mw-parser-output .note-info{background-color:#eaf3ff;color:#333;background-image:url("https://upload.wikimedia.org/wikipedia/commons/e/ec/OOjs_UI_icon_information-progressive.svg");background-size:25px;border-color:#a3caff;padding-left:40px;min-height:25px}.mw-parser-output .note-reminder{background-color:#fff9ea;color:#333;background-image:url("https://upload.wikimedia.org/wikipedia/commons/a/a8/OOjs_UI_icon_lightbulb-yellow.svg");background-size:25px;border-color:#fc3;min-height:25px}.mw-parser-output .note-warn{background-color:#fff9ea;color:#333;background-image:url("https://upload.wikimedia.org/wikipedia/commons/3/3b/OOjs_UI_icon_alert-warning.svg");background-size:25px;border-color:#fc3;min-height:25px}.mw-parser-output .note-error{background-color:#fee7e6;color:#333;background-image:url("https://upload.wikimedia.org/wikipedia/commons/b/bf/OOjs_UI_icon_notice-destructive.svg");background-size:25px;border-color:#c33;min-height:25px}@media screen{html.skin-theme-clientpref-night .mw-parser-output .note{background-color:transparent;color:inherit}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .note{background-color:transparent;color:inherit}}</style><div role="note" class="note note-info">The instructions below are only valid for the default configuration. If you change <code><a href="/wiki/Special:MyLanguage/Manual:$wgMWLoggerDefaultSpi" title="Special:MyLanguage/Manual:$wgMWLoggerDefaultSpi">$wgMWLoggerDefaultSpi</a><span style="display:none"><a href="/wiki/Manual:$wgMWLoggerDefaultSpi" title="Manual:$wgMWLoggerDefaultSpi"> </a></span></code>, for example to enable the <code>psr3</code> role on a <a href="/wiki/Special:MyLanguage/MediaWiki-Vagrant" title="Special:MyLanguage/MediaWiki-Vagrant">vagrant</a><span style="display:none"><a href="/wiki/MediaWiki-Vagrant" title="MediaWiki-Vagrant"> </a></span> box, these settings will probably be ignored. In this case, see the documentation of your logger, for example, <a href="/wiki/Special:MyLanguage/Manual:MonologSpi" title="Special:MyLanguage/Manual:MonologSpi">Manual:MonologSpi</a><span style="display:none"><a href="/wiki/Manual:MonologSpi" class="mw-redirect" title="Manual:MonologSpi"> </a></span>.</div> <div class="mw-heading mw-heading4"><h4 id="Setting_up_a_debug_log_file">Setting up a debug log file</h4></div> <p>To save errors and debugging information to a log, add <code><a href="/wiki/Special:MyLanguage/Manual:$wgDebugLogFile" title="Special:MyLanguage/Manual:$wgDebugLogFile">$wgDebugLogFile</a><span style="display:none"><a href="/wiki/Manual:$wgDebugLogFile" title="Manual:$wgDebugLogFile"> </a></span></code> to the <code>LocalSettings.php</code> file. Change the value to a text file where you want to save the debug trace output. </p><p>The MediaWiki software must have permissions from your operating system to create and write to this file, for example in a default Ubuntu install it runs as user & group <code>www-data</code>:<code>www-data</code>. Here's a sample setting: </p> <div class="mw-highlight mw-highlight-lang-php mw-content-ltr" dir="ltr"><pre><span></span><span class="sd">/**</span> <span class="sd"> * The debug log file must never be publicly accessible because it contains private data.</span> <span class="sd"> * But ensure that the directory is writeable by the PHP script running within your Web server.</span> <span class="sd"> * The filename is with the database name of the wiki.</span> <span class="sd"> */</span> <span class="nv">$wgDebugLogFile</span> <span class="o">=</span> <span class="s2">"/var/log/mediawiki/debug-</span><span class="si">{</span><span class="nv">$wgDBname</span><span class="si">}</span><span class="s2">.log"</span><span class="p">;</span> </pre></div> <p>This file will contain much debug information from MediaWiki core and extensions. Some subsystems write to custom logs, see <a href="#Creating_a_custom_log_file">#Creating a custom log file</a> to capture their output. </p><p><br /> </p> <table class="warning-message" style="background-color: var( --background-color-error-subtle, #ffe9e5 ); color: var( --color-base, #202122 ); border: 1px var( --border-color-error, #9f3526 ) solid; box-sizing: border-box; margin: 0.5em 0; padding: 0.5em;"><tbody><tr><td style="white-space: nowrap; vertical-align: top;"><span style="position: relative; top: -2px;"><span typeof="mw:File"><span><img alt="Warning" src="//upload.wikimedia.org/wikipedia/commons/thumb/b/bf/OOjs_UI_icon_notice-destructive.svg/18px-OOjs_UI_icon_notice-destructive.svg.png" decoding="async" width="18" height="18" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/b/bf/OOjs_UI_icon_notice-destructive.svg/27px-OOjs_UI_icon_notice-destructive.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/b/bf/OOjs_UI_icon_notice-destructive.svg/36px-OOjs_UI_icon_notice-destructive.svg.png 2x" data-file-width="20" data-file-height="20" /></span></span></span> <b>Warning:</b> </td><td style="padding-left: 0.5em vertical-align: top;">The debug log file can contain private information such as login credentials, session cookies, and values of submitted forms. If this information is publicly accessible, attackers can use it to hack and compromise your machine and user account. If you need to share a debug log for diagnostic purposes, access the wiki without being logged in, and remove from the debug log any COOKIE lines, and don't capture any login attempt.</td></tr></tbody></table> <div class="mw-heading mw-heading4"><h4 id="Creating_custom_log_groups">Creating custom log groups</h4></div> <p>If you're debugging several different components, it may be useful to direct certain log groups to write to a separate file. See <a href="/wiki/Special:MyLanguage/Manual:$wgDebugLogGroups" title="Special:MyLanguage/Manual:$wgDebugLogGroups">$wgDebugLogGroups</a><span style="display:none"><a href="/wiki/Manual:$wgDebugLogGroups" title="Manual:$wgDebugLogGroups"> </a></span> for more information. </p><p>To set up custom log groups, use the following to LocalSettings.php: </p> <div class="mw-highlight mw-highlight-lang-php mw-content-ltr" dir="ltr"><pre><span></span><span class="sd">/**</span> <span class="sd"> * The debug log file should not be publicly accessible if it is used, as it</span> <span class="sd"> * may contain private data. However, it must be in a directory to which PHP run</span> <span class="sd"> * within your web server can write.</span> <span class="sd"> *</span> <span class="sd"> * Contrary to wgDebugLogFile, it is not necessary to include a wiki-id in these log file names</span> <span class="sd"> * if you have multiple wikis. These log entries are prefixed with sufficient information to</span> <span class="sd"> * identify the relevant wiki (web server hostname and wiki-id).</span> <span class="sd"> */</span> <span class="c1">// Groups from MediaWiki core</span> <span class="nv">$wgDBerrorLog</span> <span class="o">=</span> <span class="s1">'/var/log/mediawiki/dberror.log'</span><span class="p">;</span> <span class="nv">$wgDebugLogGroups</span> <span class="o">=</span> <span class="k">array</span><span class="p">(</span> <span class="s1">'exception'</span> <span class="o">=></span> <span class="s1">'/var/log/mediawiki/exception.log'</span><span class="p">,</span> <span class="s1">'resourceloader'</span> <span class="o">=></span> <span class="s1">'/var/log/mediawiki/resourceloader.log'</span><span class="p">,</span> <span class="s1">'ratelimit'</span> <span class="o">=></span> <span class="s1">'/var/log/mediawiki/ratelimit.log'</span><span class="p">,</span> <span class="c1">// Extra log groups from your extension</span> <span class="c1">#'myextension' => '/var/log/mediawiki/myextension.log',</span> <span class="c1">#'somegroup' => '/var/log/mediawiki/somegroup.log',</span> <span class="p">);</span> </pre></div> <p>To log to one of these groups, call <code>wfDebugLog</code> like this: </p> <div class="mw-highlight mw-highlight-lang-php mw-content-ltr" dir="ltr"><pre><span></span><span class="k">if</span> <span class="p">(</span> <span class="nv">$module</span><span class="o">-></span><span class="na">hasFailed</span> <span class="p">)</span> <span class="p">{</span> <span class="nx">wfDebugLog</span><span class="p">(</span> <span class="s1">'myextension'</span><span class="p">,</span> <span class="s2">"Something is not right, module </span><span class="si">{</span><span class="nv">$module</span><span class="o">-></span><span class="na">name</span><span class="si">}</span><span class="s2"> failed."</span> <span class="p">);</span> <span class="p">}</span> </pre></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r6651107"><div role="note" class="note note-reminder">If you have carefully followed the instructions above but nothing gets written to your logging file(s), and if your system is using SELinux, have a look at the <a href="/wiki/Special:MyLanguage/SELinux#Debug_logging_file" title="Special:MyLanguage/SELinux">logging section on the SELinux page</a> to get around this SELinux context issue.</div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r6651107"><div role="note" class="note note-reminder">Writing log files to the <code>/tmp</code> directory may not generate any log file at all, even if the /tmp directory is supposed to be writable by anyone. This could happen if your system is using one of the systemd features that create a virtual /tmp directory for that process. If that's the case, configure your log file to be written into a different directory, like <code>/var/log/mediawiki</code></div> <div class="mw-heading mw-heading4"><h4 id="Structured_logging">Structured logging</h4></div> <style data-mw-deduplicate="TemplateStyles:r4199130">.mw-parser-output .mw-version{border:1px solid #72777d;font-size:80%;line-height:1.2;border-collapse:collapse}.mw-parser-output .mw-version-ltr{float:right;margin:0 0 .5em .5em;text-align:right}.mw-parser-output .mw-version-rtl{float:left;margin:0 .5em .5em 0;text-align:left}.mw-parser-output .mw-version td{padding:.1em .3em}.mw-parser-output .mw-version-versionbox{border:5px solid #00af89;text-align:center}.mw-parser-output .mw-version-versionnumber{font-weight:bold;font-size:180%}.mw-parser-output .mw-version-version .mw-version-versionbox{border-color:#c8ccd1}.mw-parser-output .mw-version.mw-version-version2 .mw-version-versionbox{border-top-color:#c8ccd1;border-right-color:#c8ccd1;border-left-color:#c8ccd1}.mw-parser-output .mw-version-version-unsupported .mw-version-versionbox{border-color:#d33}.mw-parser-output .mw-version.mw-version-version2-unsupported .mw-version-versionbox{border-top-color:#d33;border-right-color:#d33;border-left-color:#d33}.mw-parser-output .mw-version-version-legacy .mw-version-versionbox{border-color:#f93}.mw-parser-output .mw-version.mw-version-version2-legacy .mw-version-versionbox{border-top-color:#f93;border-right-color:#f93;border-left-color:#f93}.mw-parser-output .mw-version-version-stable .mw-version-versionbox,.mw-parser-output .mw-version.mw-version.mw-version-and-later .mw-version-versionbox{border-color:#00af89}.mw-parser-output .mw-version.mw-version-version2-stable .mw-version-versionbox{border-top-color:#00af89;border-right-color:#00af89;border-left-color:#00af89}.mw-parser-output .mw-version-version-future .mw-version-versionbox{border-color:#8080c0}.mw-parser-output .mw-version.mw-version-version2-future .mw-version-versionbox{border-top-color:#8080c0;border-right-color:#8080c0;border-left-color:#8080c0}.mw-parser-output .mw-version-version-alpha .mw-version-versionbox{border-style:dotted}</style> <table class="mw-version mw-version-ltr mw-version-version mw-version-version-unsupported mw-version-and-later"><tbody><tr> <td>MediaWiki version:</td> <td class="mw-version-versionbox" title="The latest stable version is 1.42"><div class="mw-version-versionnumber"><small>≥</small> 1.25</div></td> </tr></tbody></table> <p>Structured logging allows you to include fields in your log records. See <a href="/wiki/Special:MyLanguage/Structured_logging" title="Special:MyLanguage/Structured logging">Structured logging</a><span style="display:none"><a href="/wiki/Structured_logging" class="mw-redirect" title="Structured logging"> </a></span> for more information. </p> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r6651107"><div role="note" class="note note-info">You will need to configure a better logger to collect the extra fields, for example Monolog.</div> <div class="mw-heading mw-heading4"><h4 id="JavaScript_error_logging">JavaScript error logging</h4></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r4199130"> <table class="mw-version mw-version-ltr mw-version-version mw-version-version-unsupported mw-version-and-later"><tbody><tr> <td>MediaWiki version:</td> <td class="mw-version-versionbox" title="The latest stable version is 1.42"><div class="mw-version-versionnumber"><small>≥</small> 1.36</div></td> </tr></tbody></table> <p>See the documentation of the <a href="/wiki/Special:MyLanguage/ResourceLoader/Core_modules#mediawiki.errorLogger" title="Special:MyLanguage/ResourceLoader/Core modules">mediawiki.errorLogger</a><span style="display:none"><a href="/wiki/ResourceLoader/Core_modules#mediawiki.errorLogger" title="ResourceLoader/Core modules"> </a></span> ResourceLoader module. </p> <div class="mw-heading mw-heading3"><h3 id="Statistics">Statistics</h3></div> <p>Advanced client-side logging can be performed with <a href="/wiki/Special:MyLanguage/Extension:EventLogging" title="Special:MyLanguage/Extension:EventLogging">Extension:EventLogging</a><span style="display:none"><a href="/wiki/Extension:EventLogging" title="Extension:EventLogging"> </a></span>, which requires a complex setup and careful inspection of privacy issues. </p><p>Simple counting of certain kind of events is possible (since MediaWiki 1.25) using <a rel="nofollow" class="external text" href="https://github.com/etsy/statsd">StatsD</a>. StatsD offers meters, gauges, counters, and timing metrics. </p><p>Usage example: </p> <div class="mw-highlight mw-highlight-lang-php mw-content-ltr" dir="ltr"><pre><span></span><span class="nv">$stats</span> <span class="o">=</span> <span class="nv">$context</span><span class="o">-></span><span class="na">getStats</span><span class="p">();</span> <span class="nv">$stats</span><span class="o">-></span><span class="na">increment</span><span class="p">(</span> <span class="s1">'resourceloader.cache.hits'</span> <span class="p">);</span> <span class="nv">$stats</span><span class="o">-></span><span class="na">timing</span><span class="p">(</span> <span class="s1">'resourceloader.cache.rtt'</span><span class="p">,</span> <span class="nv">$rtt</span> <span class="p">);</span> </pre></div> <p>The metrics can be sent to a StatsD server, which may be specified via the <code>wgStatsdServer</code> configuration variable. (If not set, the metrics are discarded.) You can work with StatsD locally (without needing a Graphite server) by starting a <a rel="nofollow" class="external text" href="https://github.com/etsy/statsd">StatsD</a> server and configuring it with the "backends/console" backend, which will output metrics to the console. </p><p>As of MediaWiki 1.25, <code>wfIncrStats()</code> is a shortcut for the <code>increment()</code> method on the main <code>RequestContext::getStats()</code> instance. </p> <div class="mw-heading mw-heading3"><h3 id="Send_debug_data_to_an_HTML_comment_in_the_output">Send debug data to an HTML comment in the output</h3></div> <p>This may occasionally be useful when supporting a non-technical end-user. It's more secure than exposing the debug log file to the web, since the output only contains private data for the current user. But it's not ideal for development use since data is lost on fatal errors and redirects. Use on production sites is not recommended. Debug comments reveal information in page views which could potentially expose security risks. </p> <div class="mw-highlight mw-highlight-lang-php mw-content-ltr" dir="ltr"><pre><span></span><span class="nv">$wgDebugComments</span> <span class="o">=</span> <span class="k">true</span><span class="p">;</span> </pre></div> <ul><li><a href="/wiki/Special:MyLanguage/Manual:$wgDebugComments" title="Special:MyLanguage/Manual:$wgDebugComments">$wgDebugComments</a><span style="display:none"><a href="/wiki/Manual:$wgDebugComments" title="Manual:$wgDebugComments"> </a></span></li></ul> <div class="mw-heading mw-heading3"><h3 id="Working_live_with_MediaWiki_objects">Working live with MediaWiki objects</h3></div> <p><a href="/wiki/Special:MyLanguage/Manual:Eval.php" title="Special:MyLanguage/Manual:Eval.php">eval.php</a><span style="display:none"><a href="/wiki/Manual:Eval.php" title="Manual:Eval.php"> </a></span> is an interactive script to evaluate and interact with MediaWiki objects and functions in a fully initialized environment. </p> <pre> $ php maintenance/eval.php > print wfMessage("Recentchanges")->plain(); Recent changes </pre> <p>The <a href="/wiki/Special:MyLanguage/MediaWiki-Vagrant" title="Special:MyLanguage/MediaWiki-Vagrant">MediaWiki-Vagrant</a><span style="display:none"><a href="/wiki/MediaWiki-Vagrant" title="MediaWiki-Vagrant"> </a></span> portable virtual machine integrates the interactive PHP shell <code>phpsh</code> (when using Zend). </p> <div class="mw-heading mw-heading3"><h3 id="Callable_updates">Callable updates</h3></div> <p>Code embedded in the <code>DeferredUpdates::addCallableUpdate()</code> function, such as <code>$rc->save()</code> in <code>RecentChange.php</code>, is not executed during the web request, so no error message will be displayed if it fails. For debugging, it may be helpful to temporarily remove the code from within the function so that it is executed live. </p> <div class="mw-heading mw-heading3"><h3 id="Interactive_shell">Interactive shell</h3></div> <p>You can use <a href="/wiki/Special:MyLanguage/Manual:shell.php" title="Special:MyLanguage/Manual:shell.php">shell.php</a><span style="display:none"><a href="/wiki/Manual:Shell.php" title="Manual:Shell.php"> </a></span> as a PHP <a href="https://en.wikipedia.org/wiki/REPL" class="extiw" title="w:REPL">REPL</a> with full access to MediaWiki internals. </p> <div class="mw-heading mw-heading2"><h2 id="Client_side_debugging_(JavaScript)"><span id="Client_side_debugging_.28JavaScript.29"></span>Client side debugging (JavaScript)</h2></div> <p>Wikipedia offers a rich set of tools for debugging client side JavaScript. In addition to the MediaWiki tools, other techniques are available to assist with diagnosing client interactions. </p><p>Tools: </p> <ul><li><a href="/wiki/Special:MyLanguage/ResourceLoader" title="Special:MyLanguage/ResourceLoader">ResourceLoader</a><span style="display:none"><a href="/wiki/ResourceLoader" title="ResourceLoader"> </a></span> offers <a href="/wiki/Special:MyLanguage/ResourceLoader/Developing_with_ResourceLoader#Debugging" title="Special:MyLanguage/ResourceLoader/Developing with ResourceLoader">a means to ensure JavaScript</a> is easily viewable by client-side tools.</li> <li>Open your browser's console. Many client side mediawiki scripts log error messages to the console using ResourceLoader, which provides <a href="/wiki/Special:MyLanguage/ResourceLoader/Modules#mediaWiki.log" title="Special:MyLanguage/ResourceLoader/Modules">a safety oriented way</a> to log to the client console. Beyond the native JavaScript logging function, it provides a check to ensure that a console is available and that logging does not produce its own error. <a href="/wiki/Special:MyLanguage/ResourceLoader/Architecture#Debug_mode" title="Special:MyLanguage/ResourceLoader/Architecture">ResourceLoader/Architecture#Debug_mode</a> also describes this feature.</li> <li>Browser tools may provide native functionality to debug client side script.</li> <li>Network tracers, like <a rel="nofollow" class="external text" href="https://www.wireshark.org/">Wireshark</a> can provide insight into the script that is being provided by a page.</li> <li>You can add <code>?debug=true</code> to your URL as in <a class="external free" href="https://www.mediawiki.org/wiki/MediaWiki?debug=true">https://www.mediawiki.org/wiki/MediaWiki?debug=true</a> to get more detailed information for debugging via your browser's console</li></ul> <div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2></div> <ul><li><a href="/wiki/Special:MyLanguage/Manual:How_to_debug/Login_problems" title="Special:MyLanguage/Manual:How to debug/Login problems">Manual:How to debug/Login problems</a><span style="display:none"><a href="/wiki/Manual:How_to_debug/Login_problems" title="Manual:How to debug/Login problems"> </a></span></li> <li><a href="/wiki/Special:MyLanguage/Manual:Profiling" title="Special:MyLanguage/Manual:Profiling">Manual:Profiling</a><span style="display:none"><a href="/wiki/Manual:Profiling" title="Manual:Profiling"> </a></span></li> <li>ResourceLoader: <a href="/wiki/Special:MyLanguage/ResourceLoader/Developing_with_ResourceLoader#Debugging" title="Special:MyLanguage/ResourceLoader/Developing with ResourceLoader">ResourceLoader/Developing with ResourceLoader#Debugging</a></li> <li>All configuration variables related to debugging/logging: <a href="/wiki/Special:MyLanguage/Manual:Configuration_settings#Debug/logging" title="Special:MyLanguage/Manual:Configuration settings">Manual:Configuration settings#Debug/logging</a></li> <li>Useful debugging tip: <code>throw new MWException( 'foo' );</code> (dies with the given message and prints the callstack)</li> <li><a href="/wiki/Special:MyLanguage/Manual:Errors_and_symptoms" title="Special:MyLanguage/Manual:Errors and symptoms">Manual:Errors and symptoms</a><span style="display:none"><a href="/wiki/Manual:Errors_and_symptoms" class="mw-redirect" title="Manual:Errors and symptoms"> </a></span></li> <li><a href="/wiki/Special:MyLanguage/Category:Debug_variables" title="Special:MyLanguage/Category:Debug variables">Category:Debug variables</a><span style="display:none"><a href="/wiki/Category:Debug_variables" title="Category:Debug variables"> </a></span></li> <li><a href="https://wikitech.wikimedia.org/wiki/Debugging_in_production" class="extiw" title="wikitech:Debugging in production">wikitech:Debugging in production</a> - Debugging on Wikimedia's production cluster</li> <li><a href="/wiki/Special:MyLanguage/Help:Locating_broken_scripts" title="Special:MyLanguage/Help:Locating broken scripts">Help:Locating broken scripts</a><span style="display:none"><a href="/wiki/Help:Locating_broken_scripts" title="Help:Locating broken scripts"> </a></span></li></ul></div><!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --><noscript><img src="https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?type=1x1&useformat=desktop" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">Retrieved from "<a dir="ltr" href="https://www.mediawiki.org/w/index.php?title=Manual:How_to_debug&oldid=6871907">https://www.mediawiki.org/w/index.php?title=Manual:How_to_debug&oldid=6871907</a>"</div></div> <div id="catlinks" class="catlinks" data-mw="interface"><div id="mw-normal-catlinks" class="mw-normal-catlinks"><a href="/wiki/Special:Categories" title="Special:Categories">Categories</a>: <ul><li><a href="/wiki/Category:MediaWiki_development" title="Category:MediaWiki development">MediaWiki development</a></li><li><a href="/wiki/Category:Log" title="Category:Log">Log</a></li><li><a href="/wiki/Category:Debug" title="Category:Debug">Debug</a></li></ul></div></div> </div> </main> </div> <div class="mw-footer-container"> <footer id="footer" class="mw-footer" > <ul id="footer-info"> <li id="footer-info-lastmod"> This page was last edited on 27 November 2024, at 18:45.</li> <li id="footer-info-copyright">Text is available under the <a rel="nofollow" class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-ShareAlike License</a>; additional terms may apply. Text in <a class="external text" href="https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents">the Help: namespace</a> is available under the <a rel="nofollow" class="external text" href="https://creativecommons.org/publicdomain/zero/1.0/">Creative Commons CC0 License</a>. By using this site, you agree to the <a class="external text" href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Terms_of_Use">Terms of Use</a> and <a class="external text" href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">Privacy Policy</a>.</li> </ul> <ul id="footer-places"> <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">Privacy policy</a></li> <li id="footer-places-about"><a href="/wiki/Project:About">About mediawiki.org</a></li> <li id="footer-places-disclaimers"><a href="/wiki/Project:General_disclaimer">Disclaimers</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://www.mediawiki.org/wiki/Special:MyLanguage/Code_of_Conduct">Code of Conduct</a></li> <li id="footer-places-developers"><a href="https://developer.wikimedia.org">Developers</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/www.mediawiki.org">Statistics</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Cookie statement</a></li> <li id="footer-places-mobileview"><a href="//m.mediawiki.org/w/index.php?title=Manual:How_to_debug&diff=prev&oldid=6871907&mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">Mobile view</a></li> </ul> <ul id="footer-icons" class="noprint"> <li id="footer-copyrightico"><a href="https://wikimediafoundation.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/static/images/footer/wikimedia-button.svg" width="84" height="29" alt="Wikimedia Foundation" loading="lazy"></a></li> <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/w/resources/assets/poweredby_mediawiki.svg" alt="Powered by MediaWiki" width="88" height="31" loading="lazy"></a></li> </ul> </footer> </div> </div> </div> <div class="vector-settings" id="p-dock-bottom"> <ul></ul> </div><script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgHostname":"mw-web.codfw.main-5c59558b9d-j9wx6","wgBackendResponseTime":173,"wgPageParseReport":{"limitreport":{"cputime":"0.384","walltime":"0.534","ppvisitednodes":{"value":2671,"limit":1000000},"postexpandincludesize":{"value":20529,"limit":2097152},"templateargumentsize":{"value":10767,"limit":2097152},"expansiondepth":{"value":14,"limit":100},"expensivefunctioncount":{"value":39,"limit":500},"unstrip-depth":{"value":0,"limit":20},"unstrip-size":{"value":22930,"limit":5000000},"entityaccesscount":{"value":0,"limit":400},"timingprofile":["100.00% 269.647 1 -total"," 55.55% 149.783 27 Template:Ll"," 26.73% 72.086 54 Template:Translatable"," 22.68% 61.158 28 Template:Pagelang"," 15.28% 41.197 1 Template:MW_1.25"," 12.76% 34.413 2 Template:MW_version/layout"," 12.01% 32.384 1 Template:MW_version/en"," 11.21% 30.215 4 Template:Note"," 9.15% 24.665 7 Template:TNTN"," 4.47% 12.063 1 Template:MW_1.36"]},"scribunto":{"limitreport-timeusage":{"value":"0.048","limit":"10.000"},"limitreport-memusage":{"value":1197498,"limit":52428800}},"cachereport":{"origin":"mw-api-int.codfw.main-5c84955dfd-lzj5f","timestamp":"20241127224228","ttl":2592000,"transientcontent":false}}});});</script> </body> </html>