Help:Lua debugging: Difference between revisions

Content deleted Content added
How debug: grammar
Without changing the code: +examples of using "=", which is faster to type than mw.log()
Line 31:
 
====Without changing the code====
To obtain variables and values returned from functions (not local in both cases) the "Debug console" can be used. The "Debug console" appears below in the module page (when it is in edit mode). Then <code>mw.log</code> and, <code>mw.logObject</code>, and <code>=</code> willcan be used. Let's see its usefulness in the next example (module that can be found [[Module:Example of lua debugging|here]]):
{{#tag:syntaxhighlight|
{{Module:Example of lua debugging}}
Line 53:
:9,
}
|-
| {{blue|{{=}}p.sum_mult(10)}} || 20 100
|-
| {{blue|{{=}}p.Hello .. ', World!'}} || Hello, World!
|}