Zum Inhalt springen

Modul:debug/Doku

Vun Wiktionary

Dies ist die Dokumentationsseite für Modul:debug

This module is used to debug templates and other modules, and to help track down problems or incorrect usage.

dump

[ännern]

dump(value)

Converts any value (except for functions) into a string representation. The string is formatted as Lua syntax, so you should be able to take the output of this function and insert it back into a Lua module. Tables are processed recursively.

error

[ännern]

{{#invoke:debug|error|message}}

This function is invoked from templates, and simply triggers a script error with a message. This is useful if you want to trigger a script error but don't have the time or knowledge to convert a template to Lua.

track

[ännern]

track(key)

Convenience function which transcludes a tracking subtemplate.