Skip to content

[Feature Request] Support for debug.sethook or API to access line numbers/stack trace #41

@AndreiRobertP

Description

@AndreiRobertP

I am currently using lua_dardo to build an educational coding game for children.
To make this application viable, I have a requirement that relies on the Lua Debug API: I need to know the current line number of the executing script to highlight the code in the UI as it runs.

I attempted to use the standard Lua approach described in Programming in Lua (Hooks), but the debug library and debug.sethook do not appear to be available or exposed. Additionally, looking at the LuaState members in Dart, I could not find a way to retrieve the current stack trace or line number during execution.

This feature is standard in the C-Lua API (lua_sethook). Adding this would significantly widen the use cases for lua_dardo in the Flutter ecosystem.

Thank you for your hard work on this library!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions