EngineDebugger

Inherits: Object

Exposes the internal debugger.

Description

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.

Methods

bool

has_capture ( StringName name )

bool

has_profiler ( StringName name )

bool

is_active ( )

bool

is_profiling ( StringName name )

void

profiler_add_frame_data ( StringName name, Array data )

void

profiler_enable ( StringName name, bool enable, Array arguments=[] )

void

register_message_capture ( StringName name, Callable callable )

void

register_profiler ( StringName name, Callable toggle, Callable add, Callable tick )

void

send_message ( String message, Array data )

void

unregister_message_capture ( StringName name )

void

unregister_profiler ( StringName name )

Method Descriptions

Returns true if a capture with the given name is present otherwise false.


Returns true if a profiler with the given name is present otherwise false.


  • bool is_active ( )

Returns true if the debugger is active otherwise false.


Returns true if a profiler with the given name is present and active otherwise false.


Calls the add callable of the profiler with given name and data.


Calls the toggle callable of the profiler with given name and arguments. Enables/Disables the same profiler depending on enable argument.


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.


Registers a profiler with the given name.

toggle callable is called when the profiler is enabled/disabled. It must take an argument array as an argument.

add callable is called when data is added to profiler using profiler_add_frame_data. It must take a data array as argument.

tick callable is called at every active profiler iteration. It must take frame time, idle time, physics time, and physics idle time as arguments.


Sends a message with given message and data array.


  • void unregister_message_capture ( StringName name )

Unregisters the message capture with given name.


Unregisters a profiler with given name.