compartilhando o resultado ( a versão 'com rede' foi suprimida pq pra reproduzir teria que ir mais coisas )
valeu
-- .'. -------------------------------------------------------- .'. --
getinfo = debug.getinfo;
sprintf = string.format;
xprint = print;
function emulation(x)
local fn = sprintf('%s()', x.name); -- __FUNCTION__ local fi = x.short_src; -- __FILE__
local ln = x.currentline; -- __LINE__
return sprintf( '[DEBUG] %s %s:%s', fn, fi, ln );
end
function soma(a, b)
xprint( emulation(getinfo(1)) );
return ( tonumber(a) + tonumber(b) );
end
soma(10, 19);