Luau Bindings — debug (dbg)

The require("dbg") script API — control the AntOS GDB remote (RSP) debug server: attach a debugger from a PC or another AntOS machine, set breakpoints, define memory regions, and drive tracing. Every function is [antos]. Design & native core: antos_debug. (This is the AntOS debug server, distinct from the Luau VM's own debug table.)

local dbg = require("dbg")
dbg.start()                      -- GDB server on port 1234
dbg.addBreakpoint(0x8000_0100)

Server

Function Behaviour
dbg.start([port]) Start the server (default 1234).
dbg.stop() · dbg.status() Stop / { running, client, port, target, bpCount }.

Breakpoints

Function Behaviour
dbg.addBreakpoint(addr) · dbg.removeBreakpoint(addr) Set / clear one.
dbg.clearBreakpoints() · dbg.breakpoints() Clear all / list.
dbg.isBreakpoint(addr) · dbg.notifyStop(...) Query / signal a stop to the client.

Memory regions & trace

Function Behaviour
dbg.addMemRegion(addr, len [, kind]) · dbg.clearMemRegions() Define / clear the regions the debugger may read.
dbg.traceEnable(on) · dbg.tracePoll() Enable tracing / poll trace events.

AntOS also has the client side, so you can debug one AntOS box from another — see Three Ways Into the Machine.

Related

Important: The Ant64 family of home computers are at early design/prototype stage, everything you see here is subject to change.