EngineDebugger
Exposes the internal debugger.
Exposes the internal debugger.
EngineDebugger handles the communication between the editor and the running game. It is active in the running game. Messages can be sent/received through it. It also manages the profilers.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Properties1
SingletonProperty
public static EngineDebuggerInstance Singleton { get; }Methods23
ClearBreakpointsvoid
public static void ClearBreakpoints();Clears all breakpoints.
Debugvoid
public static void Debug(bool canContinue = true, bool isErrorBreakpoint = false);Starts a debug break in script execution, optionally specifying whether the program can continue based on can_continue and whether the break was due to a breakpoint.
| Name | Type | Default |
|---|---|---|
canContinue | bool | true |
isErrorBreakpoint | bool | false |
GetDepthint
public static int GetDepth();Returns the current debug depth.
intGetLinesLeftint
public static int GetLinesLeft();Returns the number of lines that remain.
intHasCapturebool
public static bool HasCapture(StringName name);Returns true if a capture with the given name is present otherwise false.
| Name | Type | Default |
|---|---|---|
name | StringName | — |
boolHasProfilerbool
public static bool HasProfiler(StringName name);Returns true if a profiler with the given name is present otherwise false.
| Name | Type | Default |
|---|---|---|
name | StringName | — |
boolInsertBreakpointvoid
public static void InsertBreakpoint(int line, StringName source);Inserts a new breakpoint with the given source and line.
| Name | Type | Default |
|---|---|---|
line | int | — |
source | StringName | — |
IsActivebool
public static bool IsActive();Returns true if the debugger is active otherwise false.
boolIsBreakpointbool
public static bool IsBreakpoint(int line, StringName source);Returns true if the given source and line represent an existing breakpoint.
| Name | Type | Default |
|---|---|---|
line | int | — |
source | StringName | — |
boolIsProfilingbool
public static bool IsProfiling(StringName name);Returns true if a profiler with the given name is present and active otherwise false.
| Name | Type | Default |
|---|---|---|
name | StringName | — |
boolIsSkippingBreakpointsbool
public static bool IsSkippingBreakpoints();Returns true if the debugger is skipping breakpoints otherwise false.
boolLinePollvoid
public static void LinePoll();Forces a processing loop of debugger events. The purpose of this method is just processing events every now and then when the script might get too busy, so that bugs like infinite loops can be caught.
ProfilerAddFrameDatavoid
public static void ProfilerAddFrameData(StringName name, Reckfell.Collections.Array data);Calls the add callable of the profiler with given name and data.
| Name | Type | Default |
|---|---|---|
name | StringName | — |
data | Reckfell.Collections.Array | — |
ProfilerEnablevoid
public static void ProfilerEnable(StringName name, bool enable, Reckfell.Collections.Array arguments = null);Calls the toggle callable of the profiler with given name and arguments. Enables/Disables the same profiler depending on enable argument.
| Name | Type | Default |
|---|---|---|
name | StringName | — |
enable | bool | — |
arguments | Reckfell.Collections.Array | null |
RegisterMessageCapturevoid
public static void RegisterMessageCapture(StringName name, Callable callable);Registers a message capture with given name. If name is "my_message" then messages starting with "my_message:" will be called with the given callable.
The callable must accept a message string and a data array as argument. The callable should return true if the message is recognized.
Note: The callable will receive the message with the prefix stripped, unlike EditorDebuggerPlugin._Capture. See the EditorDebuggerPlugin description for an example.
| Name | Type | Default |
|---|---|---|
name | StringName | — |
callable | Callable | — |
RegisterProfilervoid
public static void RegisterProfiler(StringName name, EngineProfiler profiler);Registers a profiler with the given name. See EngineProfiler for more information.
| Name | Type | Default |
|---|---|---|
name | StringName | — |
profiler | EngineProfiler | — |
RemoveBreakpointvoid
public static void RemoveBreakpoint(int line, StringName source);Removes a breakpoint with the given source and line.
| Name | Type | Default |
|---|---|---|
line | int | — |
source | StringName | — |
ScriptDebugvoid
public static void ScriptDebug(ScriptLanguage language, bool canContinue = true, bool isErrorBreakpoint = false);Starts a debug break in script execution, optionally specifying whether the program can continue based on can_continue and whether the break was due to a breakpoint.
| Name | Type | Default |
|---|---|---|
language | ScriptLanguage | — |
canContinue | bool | true |
isErrorBreakpoint | bool | false |
SendMessagevoid
public static void SendMessage(string message, Reckfell.Collections.Array data);Sends a message with given message and data array.
| Name | Type | Default |
|---|---|---|
message | string | — |
data | Reckfell.Collections.Array | — |
SetDepthvoid
public static void SetDepth(int depth);Sets the current debugging depth.
| Name | Type | Default |
|---|---|---|
depth | int | — |
SetLinesLeftvoid
public static void SetLinesLeft(int lines);Sets the current debugging lines that remain.
| Name | Type | Default |
|---|---|---|
lines | int | — |
UnregisterMessageCapturevoid
public static void UnregisterMessageCapture(StringName name);Unregisters the message capture with given name.
| Name | Type | Default |
|---|---|---|
name | StringName | — |
UnregisterProfilervoid
public static void UnregisterProfiler(StringName name);Unregisters a profiler with given name.
| Name | Type | Default |
|---|---|---|
name | StringName | — |