Class ScriptDebugHooks
- Namespace
- LunyScript.Diagnostics
- Assembly
- LunyScript.dll
Debugging hooks for execution tracing and breakpoints. Events and tracing are only invoked when DEBUG or LUNYSCRIPT_DEBUG is defined.
public sealed class ScriptDebugHooks
- Inheritance
-
objectScriptDebugHooks
Constructors
ScriptDebugHooks()
public ScriptDebugHooks()
Properties
EnableTracing
When true, execution traces are recorded in the Traces list.
public bool EnableTracing { get; set; }
Property Value
- bool
Traces
Gets the recorded execution traces. Returns empty array if tracing is disabled or no traces recorded.
public IReadOnlyList<ScriptExecutionTrace> Traces { get; }
Property Value
- IReadOnlyList<ScriptExecutionTrace>
Methods
ClearTraces()
Clears all recorded execution traces.
public void ClearTraces()
Events
OnBlockComplete
Fired after a block completes successfully. Only invoked in debug builds.
public event Action<ScriptExecutionTrace> OnBlockComplete
Event Type
- Action<ScriptExecutionTrace>
OnBlockError
Fired when a block throws an exception. Only invoked in debug builds.
public event Action<ScriptExecutionTrace> OnBlockError
Event Type
- Action<ScriptExecutionTrace>
OnBlockExecute
Fired before a block executes. Only invoked in debug builds.
public event Action<ScriptExecutionTrace> OnBlockExecute
Event Type
- Action<ScriptExecutionTrace>