class_enginedebugger.rst 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/EngineDebugger.xml.
  6. .. _class_EngineDebugger:
  7. EngineDebugger
  8. ==============
  9. **Inherits:** :ref:`Object<class_Object>`
  10. Exposes the internal debugger.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. **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.
  15. .. rst-class:: classref-reftable-group
  16. Methods
  17. -------
  18. .. table::
  19. :widths: auto
  20. +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  21. | :ref:`bool<class_bool>` | :ref:`has_capture<class_EngineDebugger_method_has_capture>` **(** :ref:`StringName<class_StringName>` name **)** |
  22. +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  23. | :ref:`bool<class_bool>` | :ref:`has_profiler<class_EngineDebugger_method_has_profiler>` **(** :ref:`StringName<class_StringName>` name **)** |
  24. +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  25. | :ref:`bool<class_bool>` | :ref:`is_active<class_EngineDebugger_method_is_active>` **(** **)** |
  26. +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  27. | :ref:`bool<class_bool>` | :ref:`is_profiling<class_EngineDebugger_method_is_profiling>` **(** :ref:`StringName<class_StringName>` name **)** |
  28. +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  29. | void | :ref:`profiler_add_frame_data<class_EngineDebugger_method_profiler_add_frame_data>` **(** :ref:`StringName<class_StringName>` name, :ref:`Array<class_Array>` data **)** |
  30. +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  31. | void | :ref:`profiler_enable<class_EngineDebugger_method_profiler_enable>` **(** :ref:`StringName<class_StringName>` name, :ref:`bool<class_bool>` enable, :ref:`Array<class_Array>` arguments=[] **)** |
  32. +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  33. | void | :ref:`register_message_capture<class_EngineDebugger_method_register_message_capture>` **(** :ref:`StringName<class_StringName>` name, :ref:`Callable<class_Callable>` callable **)** |
  34. +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  35. | void | :ref:`register_profiler<class_EngineDebugger_method_register_profiler>` **(** :ref:`StringName<class_StringName>` name, :ref:`EngineProfiler<class_EngineProfiler>` profiler **)** |
  36. +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  37. | void | :ref:`send_message<class_EngineDebugger_method_send_message>` **(** :ref:`String<class_String>` message, :ref:`Array<class_Array>` data **)** |
  38. +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  39. | void | :ref:`unregister_message_capture<class_EngineDebugger_method_unregister_message_capture>` **(** :ref:`StringName<class_StringName>` name **)** |
  40. +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  41. | void | :ref:`unregister_profiler<class_EngineDebugger_method_unregister_profiler>` **(** :ref:`StringName<class_StringName>` name **)** |
  42. +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  43. .. rst-class:: classref-section-separator
  44. ----
  45. .. rst-class:: classref-descriptions-group
  46. Method Descriptions
  47. -------------------
  48. .. _class_EngineDebugger_method_has_capture:
  49. .. rst-class:: classref-method
  50. :ref:`bool<class_bool>` **has_capture** **(** :ref:`StringName<class_StringName>` name **)**
  51. Returns ``true`` if a capture with the given name is present otherwise ``false``.
  52. .. rst-class:: classref-item-separator
  53. ----
  54. .. _class_EngineDebugger_method_has_profiler:
  55. .. rst-class:: classref-method
  56. :ref:`bool<class_bool>` **has_profiler** **(** :ref:`StringName<class_StringName>` name **)**
  57. Returns ``true`` if a profiler with the given name is present otherwise ``false``.
  58. .. rst-class:: classref-item-separator
  59. ----
  60. .. _class_EngineDebugger_method_is_active:
  61. .. rst-class:: classref-method
  62. :ref:`bool<class_bool>` **is_active** **(** **)**
  63. Returns ``true`` if the debugger is active otherwise ``false``.
  64. .. rst-class:: classref-item-separator
  65. ----
  66. .. _class_EngineDebugger_method_is_profiling:
  67. .. rst-class:: classref-method
  68. :ref:`bool<class_bool>` **is_profiling** **(** :ref:`StringName<class_StringName>` name **)**
  69. Returns ``true`` if a profiler with the given name is present and active otherwise ``false``.
  70. .. rst-class:: classref-item-separator
  71. ----
  72. .. _class_EngineDebugger_method_profiler_add_frame_data:
  73. .. rst-class:: classref-method
  74. void **profiler_add_frame_data** **(** :ref:`StringName<class_StringName>` name, :ref:`Array<class_Array>` data **)**
  75. Calls the ``add`` callable of the profiler with given ``name`` and ``data``.
  76. .. rst-class:: classref-item-separator
  77. ----
  78. .. _class_EngineDebugger_method_profiler_enable:
  79. .. rst-class:: classref-method
  80. void **profiler_enable** **(** :ref:`StringName<class_StringName>` name, :ref:`bool<class_bool>` enable, :ref:`Array<class_Array>` arguments=[] **)**
  81. Calls the ``toggle`` callable of the profiler with given ``name`` and ``arguments``. Enables/Disables the same profiler depending on ``enable`` argument.
  82. .. rst-class:: classref-item-separator
  83. ----
  84. .. _class_EngineDebugger_method_register_message_capture:
  85. .. rst-class:: classref-method
  86. void **register_message_capture** **(** :ref:`StringName<class_StringName>` name, :ref:`Callable<class_Callable>` callable **)**
  87. 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.
  88. 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``.
  89. .. rst-class:: classref-item-separator
  90. ----
  91. .. _class_EngineDebugger_method_register_profiler:
  92. .. rst-class:: classref-method
  93. void **register_profiler** **(** :ref:`StringName<class_StringName>` name, :ref:`EngineProfiler<class_EngineProfiler>` profiler **)**
  94. Registers a profiler with the given ``name``. See :ref:`EngineProfiler<class_EngineProfiler>` for more information.
  95. .. rst-class:: classref-item-separator
  96. ----
  97. .. _class_EngineDebugger_method_send_message:
  98. .. rst-class:: classref-method
  99. void **send_message** **(** :ref:`String<class_String>` message, :ref:`Array<class_Array>` data **)**
  100. Sends a message with given ``message`` and ``data`` array.
  101. .. rst-class:: classref-item-separator
  102. ----
  103. .. _class_EngineDebugger_method_unregister_message_capture:
  104. .. rst-class:: classref-method
  105. void **unregister_message_capture** **(** :ref:`StringName<class_StringName>` name **)**
  106. Unregisters the message capture with given ``name``.
  107. .. rst-class:: classref-item-separator
  108. ----
  109. .. _class_EngineDebugger_method_unregister_profiler:
  110. .. rst-class:: classref-method
  111. void **unregister_profiler** **(** :ref:`StringName<class_StringName>` name **)**
  112. Unregisters a profiler with given ``name``.
  113. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  114. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  115. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  116. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  117. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  118. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  119. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`