Pagkakaiba sa pagitan ng mga pagbago ng "Module:SimpleDebug/doc"

Minor changes
m (Minor changes)
m (Minor changes)
Contains a functions to help [[:en:Help:Lua debugging#How debug|debug the lua modules]]. It allows to collect and view the values of several variables and/or points in your lua program, from a module (which is usual) or in several modules (which are required from the main module).
It is designed so that its functions are called from within the module that is to be debugged, calls that will have to be part of the code (of the module that you have designed, or that you want to improve or adapt) until you decide to delete them (when you already have determined the bug). Thus, you do not have to call any of its functions from an invoke.
{{color|red|'''little number'''}}
{{color|red|'''little number.'''}}
====With counter====
<syntaxhighlight lang="lua">
local SD = require "Module:SimpleDebug"
function Increm()
local n = 0
for i = 1, 3 do
n = n + 2
SD.vtos (n)
SD.counter = true
return SD.s
1  •  2
2  •  4
3  •  6