lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Hi Sergey,

The start() method tries to get a line number where it's called to
report to the debugger and fails to do that when called from a C
function or coroutine.wrap context (as it checks a specific stack

> Calling debug.start in any manner works fine.

Right, because it has proper stack content for the start() method to
inspect. Calling it without wrapping into a function also works as

Thank you for reporting; I'll fix this in the next version.


On Fri, Feb 15, 2013 at 7:52 AM, GrayFace <> wrote:
> This code produces an error:
> debug.mobdebug = require("mobdebug")
> coroutine.wrap(debug.mobdebug.start)()
> This one doesn't, but it doesn't work out, i.e. doesn't give control to
> ZeroBrane:
> assert(pcall(debug.mobdebug.start))
> A call close to these in other circumstances also lead to an error: <func>
> was nil in <capture_vars> called from line 818.
> This seems to solve all such problems:
> function debug.start()
>     debug.mobdebug.start()
> end
> Calling debug.start in any manner works fine.
> --
> Best regards,
> Sergey Rozhenko