Index · Object → EngineDebugger

EngineDebugger

Exposes the internal debugger.

Class 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.

Methods

func clear_breakpoints() -> void

Clears all breakpoints.

func debug(can_continue: bool = true, is_error_breakpoint: bool = false) -> void

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.

func get_depth() -> int

Returns the current debug depth.

func get_lines_left() -> int

Returns the number of lines that remain.

func has_capture(name: StringName) -> bool

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

func has_profiler(name: StringName) -> bool

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

func insert_breakpoint(line: int, source: StringName) -> void

Inserts a new breakpoint with the given source and line.

func is_active() -> bool

Returns true if the debugger is active otherwise false.

func is_breakpoint(line: int, source: StringName) -> bool

Returns true if the given source and line represent an existing breakpoint.

func is_profiling(name: StringName) -> bool

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

func is_skipping_breakpoints() -> bool

Returns true if the debugger is skipping breakpoints otherwise false.

func line_poll() -> void

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.

func profiler_add_frame_data(name: StringName, data: Array) -> void

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

func profiler_enable(name: StringName, enable: bool, arguments: Array = []) -> void

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

func register_message_capture(name: StringName, callable: Callable) -> void

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.

func register_profiler(name: StringName, profiler: EngineProfiler) -> void

Registers a profiler with the given name. See EngineProfiler for more information.

func remove_breakpoint(line: int, source: StringName) -> void

Removes a breakpoint with the given source and line.

func script_debug(language: ScriptLanguage, can_continue: bool = true, is_error_breakpoint: bool = false) -> void

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.

func send_message(message: String, data: Array) -> void

Sends a message with given message and data array.

func set_depth(depth: int) -> void

Sets the current debugging depth.

func set_lines_left(lines: int) -> void

Sets the current debugging lines that remain.

func unregister_message_capture(name: StringName) -> void

Unregisters the message capture with given name.

func unregister_profiler(name: StringName) -> void

Unregisters a profiler with given name.

Inherited from Object (62)
func _get(property: StringName) -> Variant
func _get_property_list() -> Dictionary[]
func _init() -> void
func _iter_get(iter: Variant) -> Variant
func _iter_init(iter: Array) -> bool
func _iter_next(iter: Array) -> bool
func _notification(what: int) -> void
func _set(property: StringName, value: Variant) -> bool
func _to_string() -> String
func _validate_property(property: Dictionary) -> void
func add_user_signal(signal: String, arguments: Array = []) -> void
func call(method: StringName) -> Variant
func callv(method: StringName, arg_array: Array) -> Variant
func cancel_free() -> void
func connect(signal: StringName, callable: Callable, flags: int = 0) -> Error
func disconnect(signal: StringName, callable: Callable) -> void
func emit_signal(signal: StringName) -> Error
func free() -> void
func get(property: StringName) -> Variant
func get_class() -> String
func get_incoming_connections() -> Dictionary[]
func get_indexed(property_path: NodePath) -> Variant
func get_meta(name: StringName, default: Variant = null) -> Variant
func get_meta_list() -> StringName[]
func get_method_list() -> Dictionary[]
func get_property_list() -> Dictionary[]
func get_signal_connection_list(signal: StringName) -> Dictionary[]
func get_signal_list() -> Dictionary[]
func has_meta(name: StringName) -> bool
func has_method(method: StringName) -> bool
func has_signal(signal: StringName) -> bool
func is_class(class: StringName) -> bool
func is_connected(signal: StringName, callable: Callable) -> bool
func notification(what: int, reversed: bool = false) -> void
func remove_meta(name: StringName) -> void
func remove_user_signal(signal: StringName) -> void
func set(property: StringName, value: Variant) -> void
func set_block_signals(enable: bool) -> void
func set_deferred(property: StringName, value: Variant) -> void
func set_indexed(property_path: NodePath, value: Variant) -> void
func set_message_translation(enable: bool) -> void
func set_meta(name: StringName, value: Variant) -> void
func set_script(script: Variant) -> void
func set_translation_domain(domain: StringName) -> void
func to_string() -> String
func tr(message: StringName, context: StringName = &"") -> String
func tr_n(message: StringName, plural_message: StringName, n: int, context: StringName = &"") -> String

Signals

Inherited from Object (2)