EngineDebugger

Hereda: Object

Expone el depurador interno.

Descripción

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.

Métodos

void

clear_breakpoints()

void

debug(can_continue: bool = true, is_error_breakpoint: bool = false)

int

get_depth() const

int

get_lines_left() const

bool

has_capture(name: StringName)

bool

has_profiler(name: StringName)

void

insert_breakpoint(line: int, source: StringName)

bool

is_active()

bool

is_breakpoint(line: int, source: StringName) const

bool

is_profiling(name: StringName)

bool

is_skipping_breakpoints() const

void

line_poll()

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

remove_breakpoint(line: int, source: StringName)

void

script_debug(language: ScriptLanguage, can_continue: bool = true, is_error_breakpoint: bool = false)

void

send_message(message: String, data: Array)

void

set_depth(depth: int)

void

set_lines_left(lines: int)

void

unregister_message_capture(name: StringName)

void

unregister_profiler(name: StringName)


Descripciones de Métodos

void clear_breakpoints() 🔗

Limpia todos los puntos de interrupción.


void debug(can_continue: bool = true, is_error_breakpoint: bool = false) 🔗

Starts a debug break in script execution, optionally specifying whether the program can continue based on can_continue and whether the break was due to a breakpoint.


int get_depth() const 🔗

Experimental: Este método podría ser modificado o eliminado en versiones futuras.

Devuelve la profundidad de depuración actual.


int get_lines_left() const 🔗

Experimental: Este método podría ser modificado o eliminado en versiones futuras.

Devuelve el número de líneas que quedan.


bool has_capture(name: StringName) 🔗

Devuelve true si existe una captura con el nombre dado, de lo contrario, devuelve false.


bool has_profiler(name: StringName) 🔗

Devuelve true si existe un perfilador con el nombre dado, de lo contrario, devuelve false.


void insert_breakpoint(line: int, source: StringName) 🔗

Inserta un nuevo punto de interrupción con la source y line dadas.


bool is_active() 🔗

Devuelve true si el depurador está activo, de lo contrario, devuelve false.


bool is_breakpoint(line: int, source: StringName) const 🔗

Devuelve true si la source y line dadas representan un punto de interrupción existente.


bool is_profiling(name: StringName) 🔗

Devuelve true si un perfilador con el nombre dado está presente y activo, de lo contrario, devuelve false.


bool is_skipping_breakpoints() const 🔗

Devuelve true si el depurador está omitiendo puntos de interrupción, de lo contrario, devuelve false.


void line_poll() 🔗

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.


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.

The callable must accept a message string and a data array as argument. The callable should return true if the message is recognized.

Note: The callable will receive the message with the prefix stripped, unlike EditorDebuggerPlugin._capture(). See the EditorDebuggerPlugin description for an example.


void register_profiler(name: StringName, profiler: EngineProfiler) 🔗

Registra un perfilador con el name dado. Véase EngineProfiler para obtener más información.


void remove_breakpoint(line: int, source: StringName) 🔗

Elimina un punto de interrupción con la source y line dadas.


void script_debug(language: ScriptLanguage, can_continue: bool = true, is_error_breakpoint: bool = false) 🔗

Starts a debug break in script execution, optionally specifying whether the program can continue based on can_continue and whether the break was due to a breakpoint.


void send_message(message: String, data: Array) 🔗

Envía un mensaje con el message dado y el array data.


void set_depth(depth: int) 🔗

Experimental: Este método podría ser modificado o eliminado en versiones futuras.

Establece la profundidad de depuración actual.


void set_lines_left(lines: int) 🔗

Experimental: Este método podría ser modificado o eliminado en versiones futuras.

Establece las líneas de depuración actuales que quedan.


void unregister_message_capture(name: StringName) 🔗

Anula el registro de la captura de mensajes con el name indicado.


void unregister_profiler(name: StringName) 🔗

Anula el registro de un generador de perfiles con el name especificado.