Documentation
¶
Overview ¶
graphics.gd/classdb/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.
Index ¶
- func Advanced() class
- func ClearBreakpoints()
- func Debug(is_error_breakpoint bool)
- func DebugOptions(can_continue bool, is_error_breakpoint bool)
- func GetDepth() int
- func GetLinesLeft() int
- func HasCapture(name string) bool
- func HasProfiler(name string) bool
- func InsertBreakpoint(line int, source string)
- func IsActive() bool
- func IsBreakpoint(line int, source string) bool
- func IsProfiling(name string) bool
- func IsSkippingBreakpoints() bool
- func LinePoll()
- func ProfilerAddFrameData(name string, data []any)
- func ProfilerEnable(name string, enable bool, arguments []any)
- func ProfilerEnableOptions(name string, enable bool, arguments []any)
- func RegisterMessageCapture(name string, callable func(message string, data []any) bool)
- func RegisterProfiler(name string, profiler EngineProfiler.Instance)
- func RemoveBreakpoint(line int, source string)
- func ScriptDebug(language ScriptLanguage.Instance, is_error_breakpoint bool)
- func ScriptDebugOptions(language ScriptLanguage.Instance, can_continue bool, is_error_breakpoint bool)
- func SendMessage(message string, data []any)
- func SetDepth(depth int)
- func SetLinesLeft(lines int)
- func UnregisterMessageCapture(name string)
- func UnregisterProfiler(name string)
- type Extension
- type ID
- type Instance
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Advanced ¶
func Advanced() class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
func Debug ¶
func Debug(is_error_breakpoint bool)
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.
func DebugOptions ¶
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.
func HasCapture ¶
Returns true if a capture with the given name is present otherwise false.
func HasProfiler ¶
Returns true if a profiler with the given name is present otherwise false.
func InsertBreakpoint ¶
Inserts a new breakpoint with the given 'source' and 'line'.
func IsBreakpoint ¶
Returns true if the given 'source' and 'line' represent an existing breakpoint.
func IsProfiling ¶
Returns true if a profiler with the given name is present and active otherwise false.
func IsSkippingBreakpoints ¶
func IsSkippingBreakpoints() bool
Returns true if the debugger is skipping breakpoints otherwise false.
func LinePoll ¶
func 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.
func ProfilerAddFrameData ¶
Calls the add callable of the profiler with given 'name' and 'data'.
func ProfilerEnable ¶
Calls the toggle callable of the profiler with given 'name' and 'arguments'. Enables/Disables the same profiler depending on 'enable' argument.
func ProfilerEnableOptions ¶
Calls the toggle callable of the profiler with given 'name' and 'arguments'. Enables/Disables the same profiler depending on 'enable' argument.
func RegisterMessageCapture ¶
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 graphics.gd/classdb/EditorDebuggerPlugin.Instance.Capture. See the graphics.gd/classdb/EditorDebuggerPlugin description for an example.
func RegisterProfiler ¶
func RegisterProfiler(name string, profiler EngineProfiler.Instance)
Registers a profiler with the given 'name'. See graphics.gd/classdb/EngineProfiler for more information.
func RemoveBreakpoint ¶
Removes a breakpoint with the given 'source' and 'line'.
func ScriptDebug ¶
func ScriptDebug(language ScriptLanguage.Instance, is_error_breakpoint bool)
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.
func ScriptDebugOptions ¶
func ScriptDebugOptions(language ScriptLanguage.Instance, can_continue bool, is_error_breakpoint bool)
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.
func SendMessage ¶
Sends a message with given 'message' and 'data' array.
func UnregisterMessageCapture ¶
func UnregisterMessageCapture(name string)
Unregisters the message capture with given 'name'.
func UnregisterProfiler ¶
func UnregisterProfiler(name string)
Unregisters a profiler with given 'name'.
Types ¶
type Extension ¶
Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension
type ID ¶
ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.
type Instance ¶
type Instance [1]gdclass.EngineDebugger
Instance of the class with convieniently typed arguments and results.