Table of Contents

Class EditorDebuggerSession

Namespace
Godot
Assembly
GodotSharpEditor.dll

This class cannot be directly instantiated and must be retrieved via a EditorDebuggerPlugin.

You can add tabs to the session UI via AddSessionTab(Control), send messages via SendMessage(string, Array), and toggle EngineProfilers via ToggleProfiler(string, bool, Array).

public class EditorDebuggerSession : RefCounted, IDisposable
Inheritance
EditorDebuggerSession
Implements
Inherited Members

Methods

AddSessionTab(Control)

Adds the given control to the debug session UI in the debugger bottom panel.

public void AddSessionTab(Control control)

Parameters

control Control

HasGodotClassMethod(in godot_string_name)

Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.

protected override bool HasGodotClassMethod(in godot_string_name method)

Parameters

method godot_string_name

Name of the method to check for.

Returns

bool

HasGodotClassSignal(in godot_string_name)

Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.

protected override bool HasGodotClassSignal(in godot_string_name signal)

Parameters

signal godot_string_name

Name of the signal to check for.

Returns

bool

InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)

Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.

protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)

Parameters

method godot_string_name

Name of the method to invoke.

args NativeVariantPtrArgs

Arguments to use with the invoked method.

ret godot_variant

Value returned by the invoked method.

Returns

bool

IsActive()

Returns true if the debug session is currently attached to a remote instance.

public bool IsActive()

Returns

bool

IsBreaked()

Returns true if the attached remote instance is currently in the debug loop.

public bool IsBreaked()

Returns

bool

IsDebuggable()

Returns true if the attached remote instance can be debugged.

public bool IsDebuggable()

Returns

bool

RemoveSessionTab(Control)

Removes the given control from the debug session UI in the debugger bottom panel.

public void RemoveSessionTab(Control control)

Parameters

control Control

SendMessage(string, Array)

Sends the given message to the attached remote instance, optionally passing additionally data. See EngineDebugger for how to retrieve those messages.

public void SendMessage(string message, Array data = null)

Parameters

message string
data Array

ToggleProfiler(string, bool, Array)

Toggle the given profiler on the attached remote instance, optionally passing additionally data. See EngineProfiler for more details.

public void ToggleProfiler(string profiler, bool enable, Array data = null)

Parameters

profiler string
enable bool
data Array

Events

Breaked

Emitted when the attached remote instance enters a break state. If canDebug is true, the remote instance will enter the debug loop.

public event EditorDebuggerSession.BreakedEventHandler Breaked

Event Type

EditorDebuggerSession.BreakedEventHandler

Continued

Emitted when the attached remote instance exits a break state.

public event Action Continued

Event Type

Action

Started

Emitted when a remote instance is attached to this session (i.e. the session becomes active).

public event Action Started

Event Type

Action

Stopped

Emitted when a remote instance is detached from this session (i.e. the session becomes inactive).

public event Action Stopped

Event Type

Action