2020-05-18 16:55:49 +02:00
<?xml version="1.0" encoding="UTF-8" ?>
2023-07-06 10:08:05 +02:00
<class name= "EngineDebugger" inherits= "Object" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "../class.xsd" >
2020-05-18 16:55:49 +02:00
<brief_description >
Exposes the internal debugger.
</brief_description>
<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.
</description>
<tutorials >
</tutorials>
<methods >
2024-01-02 20:07:10 +01:00
<method name= "clear_breakpoints" >
<return type= "void" />
<description >
Clears all breakpoints.
</description>
</method>
<method name= "debug" >
<return type= "void" />
<param index= "0" name= "can_continue" type= "bool" default= "true" />
<param index= "1" name= "is_error_breakpoint" type= "bool" default= "false" />
<description >
Starts a debug break in script execution, optionally specifying whether the program can continue based on [param can_continue] and whether the break was due to a breakpoint.
</description>
</method>
<method name= "get_depth" qualifiers= "const" experimental= "" >
<return type= "int" />
<description >
Returns the current debug depth.
</description>
</method>
<method name= "get_lines_left" qualifiers= "const" experimental= "" >
<return type= "int" />
<description >
Returns the number of lines that remain.
</description>
</method>
2020-05-18 16:55:49 +02:00
<method name= "has_capture" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "name" type= "StringName" />
2020-05-18 16:55:49 +02:00
<description >
Returns [code]true[/code] if a capture with the given name is present otherwise [code]false[/code].
</description>
</method>
<method name= "has_profiler" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "name" type= "StringName" />
2020-05-18 16:55:49 +02:00
<description >
Returns [code]true[/code] if a profiler with the given name is present otherwise [code]false[/code].
</description>
</method>
2024-01-02 20:07:10 +01:00
<method name= "insert_breakpoint" >
<return type= "void" />
<param index= "0" name= "line" type= "int" />
<param index= "1" name= "source" type= "StringName" />
<description >
Inserts a new breakpoint with the given [param source] and [param line].
</description>
</method>
2020-05-18 16:55:49 +02:00
<method name= "is_active" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
2020-05-18 16:55:49 +02:00
<description >
Returns [code]true[/code] if the debugger is active otherwise [code]false[/code].
</description>
</method>
2024-01-02 20:07:10 +01:00
<method name= "is_breakpoint" qualifiers= "const" >
<return type= "bool" />
<param index= "0" name= "line" type= "int" />
<param index= "1" name= "source" type= "StringName" />
<description >
Returns [code]true[/code] if the given [param source] and [param line] represent an existing breakpoint.
</description>
</method>
2020-05-18 16:55:49 +02:00
<method name= "is_profiling" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "name" type= "StringName" />
2020-05-18 16:55:49 +02:00
<description >
Returns [code]true[/code] if a profiler with the given name is present and active otherwise [code]false[/code].
</description>
</method>
2024-01-02 20:07:10 +01:00
<method name= "is_skipping_breakpoints" qualifiers= "const" >
<return type= "bool" />
<description >
Returns [code]true[/code] if the debugger is skipping breakpoints otherwise [code]false[/code].
</description>
</method>
<method name= "line_poll" >
<return type= "void" />
<description >
2024-09-20 13:33:32 +02:00
Forces a processing loop of debugger events. The purpose of this method is just processing events every now and then when the script might get too busy, so that bugs like infinite loops can be caught.
2024-01-02 20:07:10 +01:00
</description>
</method>
2020-05-18 16:55:49 +02:00
<method name= "profiler_add_frame_data" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "name" type= "StringName" />
<param index= "1" name= "data" type= "Array" />
2020-05-18 16:55:49 +02:00
<description >
2022-08-12 18:07:53 +02:00
Calls the [code]add[/code] callable of the profiler with given [param name] and [param data].
2020-05-18 16:55:49 +02:00
</description>
</method>
<method name= "profiler_enable" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "name" type= "StringName" />
<param index= "1" name= "enable" type= "bool" />
<param index= "2" name= "arguments" type= "Array" default= "[]" />
2020-05-18 16:55:49 +02:00
<description >
2023-04-26 21:36:04 +02:00
Calls the [code]toggle[/code] callable of the profiler with given [param name] and [param arguments]. Enables/Disables the same profiler depending on [param enable] argument.
2020-05-18 16:55:49 +02:00
</description>
</method>
<method name= "register_message_capture" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "name" type= "StringName" />
<param index= "1" name= "callable" type= "Callable" />
2020-05-18 16:55:49 +02:00
<description >
2022-08-12 18:07:53 +02:00
Registers a message capture with given [param name]. If [param name] is "my_message" then messages starting with "my_message:" will be called with the given callable.
2020-05-18 16:55:49 +02:00
Callable must accept a message string and a data array as argument. If the message and data are valid then callable must return [code]true[/code] otherwise [code]false[/code].
</description>
</method>
<method name= "register_profiler" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "name" type= "StringName" />
<param index= "1" name= "profiler" type= "EngineProfiler" />
2020-05-18 16:55:49 +02:00
<description >
2022-08-12 18:07:53 +02:00
Registers a profiler with the given [param name]. See [EngineProfiler] for more information.
2020-05-18 16:55:49 +02:00
</description>
</method>
2024-01-02 20:07:10 +01:00
<method name= "remove_breakpoint" >
<return type= "void" />
<param index= "0" name= "line" type= "int" />
<param index= "1" name= "source" type= "StringName" />
<description >
Removes a breakpoint with the given [param source] and [param line].
</description>
</method>
<method name= "script_debug" >
<return type= "void" />
<param index= "0" name= "language" type= "ScriptLanguage" />
<param index= "1" name= "can_continue" type= "bool" default= "true" />
<param index= "2" name= "is_error_breakpoint" type= "bool" default= "false" />
<description >
Starts a debug break in script execution, optionally specifying whether the program can continue based on [param can_continue] and whether the break was due to a breakpoint.
</description>
</method>
2020-05-18 16:55:49 +02:00
<method name= "send_message" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "message" type= "String" />
<param index= "1" name= "data" type= "Array" />
2020-05-18 16:55:49 +02:00
<description >
2022-08-12 18:07:53 +02:00
Sends a message with given [param message] and [param data] array.
2020-05-18 16:55:49 +02:00
</description>
</method>
2024-01-02 20:07:10 +01:00
<method name= "set_depth" experimental= "" >
<return type= "void" />
<param index= "0" name= "depth" type= "int" />
<description >
Sets the current debugging depth.
</description>
</method>
<method name= "set_lines_left" experimental= "" >
<return type= "void" />
<param index= "0" name= "lines" type= "int" />
<description >
Sets the current debugging lines that remain.
</description>
</method>
2020-05-18 16:55:49 +02:00
<method name= "unregister_message_capture" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "name" type= "StringName" />
2020-05-18 16:55:49 +02:00
<description >
2022-08-12 18:07:53 +02:00
Unregisters the message capture with given [param name].
2020-05-18 16:55:49 +02:00
</description>
</method>
<method name= "unregister_profiler" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "name" type= "StringName" />
2020-05-18 16:55:49 +02:00
<description >
2022-08-12 18:07:53 +02:00
Unregisters a profiler with given [param name].
2020-05-18 16:55:49 +02:00
</description>
</method>
</methods>
</class>