Class EngineDebugger
- Namespace
- Godot
- Assembly
- GodotSharp.dll
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.
public static class EngineDebugger
- Inheritance
-
EngineDebugger
- Inherited Members
Properties
Singleton
public static EngineDebuggerInstance Singleton { get; }
Property Value
Methods
ClearBreakpoints()
Clears all breakpoints.
public static void ClearBreakpoints()
Debug(bool, bool)
Starts a debug break in script execution, optionally specifying whether the program can continue based on canContinue and whether the break was due to a breakpoint.
public static void Debug(bool canContinue = true, bool isErrorBreakpoint = false)
Parameters
GetDepth()
Returns the current debug depth.
public static int GetDepth()
Returns
GetLinesLeft()
Returns the number of lines that remain.
public static int GetLinesLeft()
Returns
HasCapture(StringName)
public static bool HasCapture(StringName name)
Parameters
nameStringName
Returns
HasProfiler(StringName)
public static bool HasProfiler(StringName name)
Parameters
nameStringName
Returns
InsertBreakpoint(int, StringName)
Inserts a new breakpoint with the given source and line.
public static void InsertBreakpoint(int line, StringName source)
Parameters
lineintsourceStringName
IsActive()
public static bool IsActive()
Returns
IsBreakpoint(int, StringName)
Returns true if the given source and line represent an existing breakpoint.
public static bool IsBreakpoint(int line, StringName source)
Parameters
lineintsourceStringName
Returns
IsProfiling(StringName)
public static bool IsProfiling(StringName name)
Parameters
nameStringName
Returns
IsSkippingBreakpoints()
public static bool IsSkippingBreakpoints()
Returns
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
public static void LinePoll()
ProfilerAddFrameData(StringName, Array)
Calls the add callable of the profiler with given name and data.
public static void ProfilerAddFrameData(StringName name, Array data)
Parameters
nameStringNamedataArray
ProfilerEnable(StringName, bool, Array)
Calls the toggle callable of the profiler with given name and arguments. Enables/Disables the same profiler depending on enable argument.
public static void ProfilerEnable(StringName name, bool enable, Array arguments = null)
Parameters
nameStringNameenableboolargumentsArray
RegisterMessageCapture(StringName, 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.
Callable must accept a message string and a data array as argument. If the message and data are valid then callable must return true otherwise false.
public static void RegisterMessageCapture(StringName name, Callable callable)
Parameters
nameStringNamecallableCallable
RegisterProfiler(StringName, EngineProfiler)
Registers a profiler with the given name. See EngineProfiler for more information.
public static void RegisterProfiler(StringName name, EngineProfiler profiler)
Parameters
nameStringNameprofilerEngineProfiler
RemoveBreakpoint(int, StringName)
Removes a breakpoint with the given source and line.
public static void RemoveBreakpoint(int line, StringName source)
Parameters
lineintsourceStringName
ScriptDebug(ScriptLanguage, bool, bool)
Starts a debug break in script execution, optionally specifying whether the program can continue based on canContinue and whether the break was due to a breakpoint.
public static void ScriptDebug(ScriptLanguage language, bool canContinue = true, bool isErrorBreakpoint = false)
Parameters
languageScriptLanguagecanContinueboolisErrorBreakpointbool
SendMessage(string, Array)
Sends a message with given message and data array.
public static void SendMessage(string message, Array data)
Parameters
SetDepth(int)
Sets the current debugging depth.
public static void SetDepth(int depth)
Parameters
depthint
SetLinesLeft(int)
Sets the current debugging lines that remain.
public static void SetLinesLeft(int lines)
Parameters
linesint
UnregisterMessageCapture(StringName)
Unregisters the message capture with given name.
public static void UnregisterMessageCapture(StringName name)
Parameters
nameStringName
UnregisterProfiler(StringName)
Unregisters a profiler with given name.
public static void UnregisterProfiler(StringName name)
Parameters
nameStringName