• Home
  • Random
  • Nearby
  • Log in
  • Settings
Donate Now If Wikipedia is useful to you, please give today.
  • About Wikipedia
  • Disclaimers
Wikipedia

Template:Debug

  • Template
  • Talk
  • Language
  • Watch
  • Edit
Template documentation[view] [edit] [history] [purge]
This template may be substituted.
This template may have no transclusions. This is because it is substituted by a tool or script, it is used as part of a short-term or less active Wikipedia process, or for some other reason.
This template uses Lua:
  • Module:Params (sandbox)

This is a debug template that echoes the arguments it was called with. You can easily spot errors in your code by temporarily replacing the name of a called template with debug.

Ideally there should not be pages that permanently transclude this template.

Usage

edit
  • {{Debug|hello|world|one{{!}}two{{!}}three{{!}}four|A {{=}} B|C = D|foo=bar}}
    ↳ {{Debug|1=hello|2=world|3=one{{!}}two{{!}}three{{!}}four|4=A = B|5=C = D|foo=bar}}

See also

edit
  • Wikipedia:Debugging templates
  • Category:Template test cases
The above documentation is transcluded from Template:Debug/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Debug&oldid=1286422205"
Last edited on 19 April 2025, at 20:30

Languages

    • Latina
    Wikipedia
    • Wikimedia Foundation
    • Powered by MediaWiki
    • This page was last edited on 19 April 2025, at 20:30 (UTC).
    • Content is available under CC BY-SA 4.0 unless otherwise noted.
    • Privacy policy
    • About Wikipedia
    • Disclaimers
    • Contact Wikipedia
    • Code of Conduct
    • Developers
    • Statistics
    • Cookie statement
    • Terms of Use
    • Desktop