Table of Contents

Class EditorDebuggerPlugin

Namespace
Godot
Assembly
GodotSharpEditor.dll

EditorDebuggerPlugin provides functions related to the editor side of the debugger.

To interact with the debugger, an instance of this class must be added to the editor via AddDebuggerPlugin(EditorDebuggerPlugin).

Once added, the _SetupSession(int) callback will be called for every EditorDebuggerSession available to the plugin, and when new ones are created (the sessions may be inactive during this stage).

You can retrieve the available EditorDebuggerSessions via GetSessions() or get a specific one via GetSession(int).

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

Constructors

EditorDebuggerPlugin()

public EditorDebuggerPlugin()

Methods

GetSession(int)

Returns the EditorDebuggerSession with the given id.

public EditorDebuggerSession GetSession(int id)

Parameters

id int

Returns

EditorDebuggerSession

GetSessions()

Returns an array of EditorDebuggerSession currently available to this debugger plugin.

Note: Sessions in the array may be inactive, check their state via IsActive().

public Array GetSessions()

Returns

Array

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

_BreakpointSetInTree(Script, int, bool)

Override this method to be notified when a breakpoint is set in the editor.

public virtual void _BreakpointSetInTree(Script script, int line, bool enabled)

Parameters

script Script
line int
enabled bool

_BreakpointsClearedInTree()

Override this method to be notified when all breakpoints are cleared in the editor.

public virtual void _BreakpointsClearedInTree()

_Capture(string, Array, int)

Override this method to process incoming messages. The sessionId is the ID of the EditorDebuggerSession that received the message (which you can retrieve via GetSession(int)).

public virtual bool _Capture(string message, Array data, int sessionId)

Parameters

message string
data Array
sessionId int

Returns

bool

_GotoScriptLine(Script, int)

Override this method to be notified when a breakpoint line has been clicked in the debugger breakpoint panel.

public virtual void _GotoScriptLine(Script script, int line)

Parameters

script Script
line int

_HasCapture(string)

Override this method to enable receiving messages from the debugger. If capture is "my_message" then messages starting with "my_message:" will be passes to the _Capture(string, Array, int) method.

public virtual bool _HasCapture(string capture)

Parameters

capture string

Returns

bool

_SetupSession(int)

Override this method to be notified whenever a new EditorDebuggerSession is created (the session may be inactive during this stage).

public virtual void _SetupSession(int sessionId)

Parameters

sessionId int