Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

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(name: StringName)

bool

has_profiler(name: StringName)

bool

is_active()

bool

is_profiling(name: StringName)

void

profiler_add_frame_data(name: StringName, data: Array)

void

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

void

register_message_capture(name: StringName, callable: Callable)

void

register_profiler(name: StringName, profiler: EngineProfiler)

void

send_message(message: String, data: Array)

void

unregister_message_capture(name: StringName)

void

unregister_profiler(name: StringName)


Method Descriptions

bool has_capture(name: StringName)

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


bool has_profiler(name: StringName)

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.


bool is_profiling(name: StringName)

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


void profiler_add_frame_data(name: StringName, data: Array)

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


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

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


void register_message_capture(name: StringName, 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.

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.


void register_profiler(name: StringName, profiler: EngineProfiler)

Registers a profiler with the given name. See EngineProfiler for more information.


void send_message(message: String, data: Array)

Sends a message with given message and data array.


void unregister_message_capture(name: StringName)

Unregisters the message capture with given name.


void unregister_profiler(name: StringName)

Unregisters a profiler with given name.


User-contributed notes

Please read the User-contributed notes policy before submitting a comment.