:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/4.2/doc/classes/EngineDebugger.xml. .. _class_EngineDebugger: EngineDebugger ============== **Inherits:** :ref:`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 ------- .. table:: :widths: auto +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_capture` **(** :ref:`StringName` name **)** | +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_profiler` **(** :ref:`StringName` name **)** | +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_active` **(** **)** | +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_profiling` **(** :ref:`StringName` name **)** | +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`profiler_add_frame_data` **(** :ref:`StringName` name, :ref:`Array` data **)** | +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`profiler_enable` **(** :ref:`StringName` name, :ref:`bool` enable, :ref:`Array` arguments=[] **)** | +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`register_message_capture` **(** :ref:`StringName` name, :ref:`Callable` callable **)** | +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`register_profiler` **(** :ref:`StringName` name, :ref:`EngineProfiler` profiler **)** | +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`send_message` **(** :ref:`String` message, :ref:`Array` data **)** | +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`unregister_message_capture` **(** :ref:`StringName` name **)** | +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`unregister_profiler` **(** :ref:`StringName` name **)** | +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_EngineDebugger_method_has_capture: .. rst-class:: classref-method :ref:`bool` **has_capture** **(** :ref:`StringName` name **)** Returns ``true`` if a capture with the given name is present otherwise ``false``. .. rst-class:: classref-item-separator ---- .. _class_EngineDebugger_method_has_profiler: .. rst-class:: classref-method :ref:`bool` **has_profiler** **(** :ref:`StringName` name **)** Returns ``true`` if a profiler with the given name is present otherwise ``false``. .. rst-class:: classref-item-separator ---- .. _class_EngineDebugger_method_is_active: .. rst-class:: classref-method :ref:`bool` **is_active** **(** **)** Returns ``true`` if the debugger is active otherwise ``false``. .. rst-class:: classref-item-separator ---- .. _class_EngineDebugger_method_is_profiling: .. rst-class:: classref-method :ref:`bool` **is_profiling** **(** :ref:`StringName` name **)** Returns ``true`` if a profiler with the given name is present and active otherwise ``false``. .. rst-class:: classref-item-separator ---- .. _class_EngineDebugger_method_profiler_add_frame_data: .. rst-class:: classref-method void **profiler_add_frame_data** **(** :ref:`StringName` name, :ref:`Array` data **)** Calls the ``add`` callable of the profiler with given ``name`` and ``data``. .. rst-class:: classref-item-separator ---- .. _class_EngineDebugger_method_profiler_enable: .. rst-class:: classref-method void **profiler_enable** **(** :ref:`StringName` name, :ref:`bool` enable, :ref:`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 ---- .. _class_EngineDebugger_method_register_message_capture: .. rst-class:: classref-method void **register_message_capture** **(** :ref:`StringName` name, :ref:`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 ---- .. _class_EngineDebugger_method_register_profiler: .. rst-class:: classref-method void **register_profiler** **(** :ref:`StringName` name, :ref:`EngineProfiler` profiler **)** Registers a profiler with the given ``name``. See :ref:`EngineProfiler` for more information. .. rst-class:: classref-item-separator ---- .. _class_EngineDebugger_method_send_message: .. rst-class:: classref-method void **send_message** **(** :ref:`String` message, :ref:`Array` data **)** Sends a message with given ``message`` and ``data`` array. .. rst-class:: classref-item-separator ---- .. _class_EngineDebugger_method_unregister_message_capture: .. rst-class:: classref-method void **unregister_message_capture** **(** :ref:`StringName` name **)** Unregisters the message capture with given ``name``. .. rst-class:: classref-item-separator ---- .. _class_EngineDebugger_method_unregister_profiler: .. rst-class:: classref-method void **unregister_profiler** **(** :ref:`StringName` name **)** Unregisters a profiler with given ``name``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`