Skip to content

Latest commit

 

History

History
201 lines (119 loc) · 10.4 KB

class_enginedebugger.rst

File metadata and controls

201 lines (119 loc) · 10.4 KB
github_url:hide

EngineDebugger

Inherits: :ref:`Object<class_Object>`

Exposes the internal debugger.

.. rst-class:: classref-introduction-group

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.

.. rst-class:: classref-reftable-group

Methods

:ref:`bool<class_bool>` :ref:`has_capture<class_EngineDebugger_method_has_capture>` ( :ref:`StringName<class_StringName>` name )
:ref:`bool<class_bool>` :ref:`has_profiler<class_EngineDebugger_method_has_profiler>` ( :ref:`StringName<class_StringName>` name )
:ref:`bool<class_bool>` :ref:`is_active<class_EngineDebugger_method_is_active>` ( )
:ref:`bool<class_bool>` :ref:`is_profiling<class_EngineDebugger_method_is_profiling>` ( :ref:`StringName<class_StringName>` name )
void :ref:`profiler_add_frame_data<class_EngineDebugger_method_profiler_add_frame_data>` ( :ref:`StringName<class_StringName>` name, :ref:`Array<class_Array>` data )
void :ref:`profiler_enable<class_EngineDebugger_method_profiler_enable>` ( :ref:`StringName<class_StringName>` name, :ref:`bool<class_bool>` enable, :ref:`Array<class_Array>` arguments=[] )
void :ref:`register_message_capture<class_EngineDebugger_method_register_message_capture>` ( :ref:`StringName<class_StringName>` name, :ref:`Callable<class_Callable>` callable )
void :ref:`register_profiler<class_EngineDebugger_method_register_profiler>` ( :ref:`StringName<class_StringName>` name, :ref:`EngineProfiler<class_EngineProfiler>` profiler )
void :ref:`send_message<class_EngineDebugger_method_send_message>` ( :ref:`String<class_String>` message, :ref:`Array<class_Array>` data )
void :ref:`unregister_message_capture<class_EngineDebugger_method_unregister_message_capture>` ( :ref:`StringName<class_StringName>` name )
void :ref:`unregister_profiler<class_EngineDebugger_method_unregister_profiler>` ( :ref:`StringName<class_StringName>` name )
.. rst-class:: classref-section-separator


.. rst-class:: classref-descriptions-group

Method Descriptions

.. rst-class:: classref-method

:ref:`bool<class_bool>` has_capture ( :ref:`StringName<class_StringName>` name )

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

.. rst-class:: classref-item-separator


.. rst-class:: classref-method

:ref:`bool<class_bool>` has_profiler ( :ref:`StringName<class_StringName>` name )

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

.. rst-class:: classref-item-separator


.. rst-class:: classref-method

:ref:`bool<class_bool>` is_active ( )

Returns true if the debugger is active otherwise false.

.. rst-class:: classref-item-separator


.. rst-class:: classref-method

:ref:`bool<class_bool>` is_profiling ( :ref:`StringName<class_StringName>` name )

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

.. rst-class:: classref-item-separator


.. rst-class:: classref-method

void profiler_add_frame_data ( :ref:`StringName<class_StringName>` name, :ref:`Array<class_Array>` data )

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

.. rst-class:: classref-item-separator


.. rst-class:: classref-method

void profiler_enable ( :ref:`StringName<class_StringName>` name, :ref:`bool<class_bool>` enable, :ref:`Array<class_Array>` arguments=[] )

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

.. rst-class:: classref-item-separator


.. rst-class:: classref-method

void register_message_capture ( :ref:`StringName<class_StringName>` name, :ref:`Callable<class_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.

.. rst-class:: classref-item-separator


.. rst-class:: classref-method

void register_profiler ( :ref:`StringName<class_StringName>` name, :ref:`EngineProfiler<class_EngineProfiler>` profiler )

Registers a profiler with the given name. See :ref:`EngineProfiler<class_EngineProfiler>` for more information.

.. rst-class:: classref-item-separator


.. rst-class:: classref-method

void send_message ( :ref:`String<class_String>` message, :ref:`Array<class_Array>` data )

Sends a message with given message and data array.

.. rst-class:: classref-item-separator


.. rst-class:: classref-method

void unregister_message_capture ( :ref:`StringName<class_StringName>` name )

Unregisters the message capture with given name.

.. rst-class:: classref-item-separator


.. rst-class:: classref-method

void unregister_profiler ( :ref:`StringName<class_StringName>` name )

Unregisters a profiler with given name.