Extension:Scribunto/Debug console

From mediawiki.org


Debug console on Module:Color/sandbox

Under the module editing window there are two useful fields. In one of them you can enter the name of an existing page and see how the changed version of the module will work on it. The second is the debugger window. There you can enter any line of text on Lua; the following is an example of code entered into the console debugging of the fn function, which is planned to be used in the call{{#invoke: Module | fn | a1 | a2 | un = ua | a3}}

--simplest case, may not work with getArgs() function (from Module:Arguments)

--if the function involves using the methods of the frame object

--if we test the function for application through the template {{SHA| sha1| sha2| ASH= SAH}}, the most accurate way

print() mw.log() mw.logObject()can be used to display information in the console.