debugger
The debugger namespace — the engine's Luau API reference for debugger.
The debugger namespace — 26 functions.
globals/debugger/__diagnostics
globals/debugger/__diagnostics() -> DebuggerDiagnostics
Internal diagnostic counters for debugging the debugger
itself: { installs, debugbreakHits }.
globals/debugger/addWatch
globals/debugger/addWatch(expr: string) -> number
Register an expression to re-evaluate on every pause.
globals/debugger/continue_
globals/debugger/continue_() -> boolean
Resume the paused thread.
globals/debugger/disableAll
globals/debugger/disableAll()
Disable every registered breakpoint. Records persist; bytecode BREAK ops are cleared.
globals/debugger/disconnect
globals/debugger/disconnect(handle: number) -> boolean
Disconnect an onBreak or onResume callback.
globals/debugger/enableAll
globals/debugger/enableAll()
Enable every registered breakpoint and re-install them in the VM bytecode.
globals/debugger/evaluate
globals/debugger/evaluate(expr: string, frame: number?) -> (string?, string?)
Evaluate an expression against the paused frame's
environment. Returns (value, error).
globals/debugger/getLocals
globals/debugger/getLocals(frame: number?) -> { [string]: string }
Locals captured at the active pause for the given frame index (1 = top). Values are stringified for safe display.
globals/debugger/getPauseInfo
globals/debugger/getPauseInfo() -> PauseInfo?
Info about the active pause, or nil if nothing is paused.
globals/debugger/getStack
globals/debugger/getStack() -> { Frame }
Captured stack from the active pause, top frame first. Empty when nothing is paused.
globals/debugger/getUpvalues
globals/debugger/getUpvalues(frame: number?) -> { [string]: string }
Upvalues captured at the active pause for the given frame.
globals/debugger/getWatchValue
globals/debugger/getWatchValue(id: number) -> (string?, string?)
Re-evaluate the watch expression against the paused frame's
environment and return (value, error).
globals/debugger/getWatches
globals/debugger/getWatches() -> { Watch }
Snapshot of all watches with their last evaluated value and error, sorted by id.
globals/debugger/isPauseOnError
globals/debugger/isPauseOnError() -> boolean
Current pause-on-error toggle state for this VM.
globals/debugger/isPaused
globals/debugger/isPaused() -> boolean
Whether the debugger currently has a paused thread.
globals/debugger/listBreakpoints
globals/debugger/listBreakpoints() -> { Breakpoint }
Snapshot of every registered breakpoint, sorted by id ascending.
globals/debugger/onBreak
globals/debugger/onBreak(fn: (PauseInfo) -> ()) -> number
Register a callback invoked on every pause with
{ path, line, reason }. Returns a handle usable with
debugger.disconnect.
globals/debugger/onResume
globals/debugger/onResume(fn: () -> ()) -> number
Register a callback invoked when the paused thread is resumed.
globals/debugger/removeBreakpoint
globals/debugger/removeBreakpoint(id: number) -> boolean
Remove the breakpoint with the given id.
globals/debugger/removeWatch
globals/debugger/removeWatch(id: number) -> boolean
Remove the watch with the given id.
globals/debugger/setBreakpoint
globals/debugger/setBreakpoint(path: string, line: number, opts: BreakpointOpts?) -> Breakpoint
Set a breakpoint at line in the script at VFS path.
globals/debugger/setPauseOnError
globals/debugger/setPauseOnError(enabled: boolean)
When true, uncaught Luau errors fire the onBreak callback (observation only — the error still propagates).
globals/debugger/stepInto
globals/debugger/stepInto() -> boolean
Run until the next line, descending into any function call.
globals/debugger/stepOut
globals/debugger/stepOut() -> boolean
Run until the current frame returns; pauses in the caller.
globals/debugger/stepOver
globals/debugger/stepOver() -> boolean
Run until the next line in the current frame. Calls inside the current line are skipped.
globals/debugger/toggleBreakpoint
globals/debugger/toggleBreakpoint(path: string, line: number) -> Breakpoint?
Toggle a breakpoint at the given line: removes if present, adds otherwise.