ScriptDebuggerService¶
Provides programmatic breakpoint management, execution control, and runtime inspection of Luau scripts during a playtest.
Not implemented yet
This class exists in the current Roblox API but is not implemented in Nova yet. Scripts that reference it will fail at runtime.
Description¶
ScriptDebuggerService exposes the Roblox Studio Luau debugger for
programmatic use. It provides functionality for breakpoint management,
execution control, and runtime state inspection.
APIs in this class are currently in beta and are subject to breaking changes.
Breakpoint Propagation¶
Breakpoints set in the edit DataModel are set on the specific script instance and do not propagate to clones, but they propagate to corresponding scripts in play data models at the start of a playtest. Breakpoints set in a play DataModel propagate to script clones in the same data model and to corresponding scripts in other data models.
Parallel Threads¶
The behavior of this API with parallel Luau is undefined.
Inheritance¶
Object โ Instance โ ScriptDebuggerService
Methods¶
| Member | Signature | Summary |
|---|---|---|
AddBreakpoint |
ScriptDebuggerService:AddBreakpoint(scriptInstance: LuaSourceContainer, breakpoint: Dictionary): Dictionary |
Adds a breakpoint to a script. If a breakpoint already exists on the same script and line, its data is replaced. |
ClearBreakpoints |
ScriptDebuggerService:ClearBreakpoints(): null |
Removes all breakpoints across all scripts. |
Evaluate |
ScriptDebuggerService:Evaluate(expression: string, frameId: int? = nil): Dictionary |
Evaluates a Luau expression in a stack frame's context. |
GetRootVariables |
ScriptDebuggerService:GetRootVariables(frameId: int): Array |
Returns the root variables (locals, upvalues, globals) for a stack frame. |
GetStackTrace |
ScriptDebuggerService:GetStackTrace(threadId: int, startFrame: int? = nil): Dictionary |
Returns the call stack for a paused thread. |
GetThreads |
ScriptDebuggerService:GetThreads(): Array |
Returns all paused Luau threads. |
GetVariables |
ScriptDebuggerService:GetVariables(variablesReference: int): Array |
Drills into structured variables (tables, Instances). |
Pause |
ScriptDebuggerService:Pause(): null |
Requests the debugger to pause at the next safe point. |
RemoveBreakpoint |
ScriptDebuggerService:RemoveBreakpoint(scriptInstance: LuaSourceContainer, line: int): bool |
Removes the breakpoint on the given script and line. |
SetExceptionBreakMode |
ScriptDebuggerService:SetExceptionBreakMode(breakMode: DebugBreakModeType): null |
Controls when the debugger pauses on exceptions. |
Events¶
| Member | Signature | Summary |
|---|---|---|
Resumed |
Resumed(threadIds: Array) |
Fires when a previously paused thread resumes execution. |
Callbacks¶
| Member | Signature | Summary |
|---|---|---|
OnStopped |
OnStopped(stopped: Dictionary) -> Dictionary |
The primary callback for reacting to debugger pauses. Returns a resume action. |
Roblox reference: ScriptDebuggerService
Generated from Nova's API dump and Roblox creator-docs. Nova-only members come from the engine's reflection metadata.