Documentation
¶
Overview ¶
Package debugx implements the `debug` native module. It covers the Lua 5.4 debug surface we can reasonably support given the VM's current frame representation:
- debug.traceback([msg], [level]) -> string
- debug.getinfo(level|function) -> table {source, currentline, name, what, nparams, isvararg}
- debug.sethook(...) -> stub no-op (signature compat only)
- debug.gethook() -> nil, nil, 0 (matches Lua's "no hook" reply)
Local/upvalue introspection (getlocal/setlocal/getupvalue/setupvalue) would need the bytecode generator to emit a stable local-name table per proto, which it doesn't yet. Leaving those out for now keeps the module honest — every function it exposes does what its Lua-5.4 counterpart does, rather than silently returning nil.
Package name `debugx` avoids colliding with Go's stdlib `runtime/debug`. The Lua-side module name is "debug".
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterDebugPreload ¶
RegisterDebugPreload installs the `debug` module under package.preload.
Types ¶
This section is empty.