EditorDebuggerPlugin
A base class to implement debugger plugins.
EditorDebuggerPlugin.swift:18class EditorDebuggerPlugin
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(script:)
.
Once added, the _setupSession(sessionId:)
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 EditorDebuggerSession
s via getSessions
or get a specific one via getSession(id:)
.
Superclasses
class RefCounted
Base class for reference-counted objects.
Citizens in SwiftGodot
Conformances
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol Identifiable<ID>
A class of types whose instances hold the value of an entity with stable identity.
protocol VariantRepresentable
Types that conform to VariantRepresentable can be stored directly in
Variant
with no conversion. These include all of the Variant types from Godot (for exampleGString
,Rect
,Plane
), Godot objects (those that subclass SwiftGodot.Object) as well as the built-in Swift types UInt8, Int64 and Double.protocol VariantStorable
Types that conform to VariantStorable can be stored in a Variant and can be extracted back out of a Variant.
Type members
Instance members
func getSession(id: Int32
) -> EditorDebuggerSession? Returns the
EditorDebuggerSession
with the givenid
.func getSessions(
) -> GArray Returns an array of
EditorDebuggerSession
currently available to this debugger plugin.
Show implementation details (3)
Hide implementation details
func _capture(message: String, data: GArray, sessionId: Int32
) -> Bool Override this method to process incoming messages. The
sessionId
is the ID of theEditorDebuggerSession
that received the message (which you can retrieve viagetSession(id:)
).func _hasCapture(String
) -> Bool 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(message:data:sessionId:)
method.func _setupSession(sessionId: Int32
) Override this method to be notified whenever a new
EditorDebuggerSession
is created (the session may be inactive during this stage).