[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: coverage analysis using debug interface?
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Mon, 24 Apr 2006 09:02:06 -0300
> Is there any way to enumerate all statements (or even all line numbers)
> in all Lua functions?
Use 'L' in debug.getinfo. The 'activelines' field in the debug info
table is a table whose keys are the lines that contain statements.
Here is an example:
f=loadfile"test.lua"
a=debug.getinfo(f,"L")
for k in pairs(a.activelines) do print(k) end
--lhf