Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

EditorDebuggerSession

繼承: RefCounted < Object

與編輯器除錯器互動的類。

說明

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

You can add tabs to the session UI via add_session_tab(), send messages via send_message(), and toggle EngineProfilers via toggle_profiler().

方法

void

add_session_tab(control: Control)

bool

is_active()

bool

is_breaked()

bool

is_debuggable()

void

remove_session_tab(control: Control)

void

send_message(message: String, data: Array = [])

void

set_breakpoint(path: String, line: int, enabled: bool)

void

toggle_profiler(profiler: String, enable: bool, data: Array = [])


訊號

breaked(can_debug: bool) 🔗

當連接的遠端實例進入中斷狀態時發出。如果 can_debugtrue,則遠端實例將進入除錯迴圈。


continued() 🔗

當連接的遠端實例退出中斷狀態時觸發。


started() 🔗

當一個遠端實例連接到該會話時觸發(即該會話成為活動狀態)。


stopped() 🔗

當一個遠端實例從該會話中分離出來時(即該會話變為非活動狀態)發出。


方法說明

void add_session_tab(control: Control) 🔗

Adds the given control to the debug session UI in the debugger bottom panel. The control's node name will be used as the tab title.


bool is_active() 🔗

如果除錯會話附加到了某個遠端實例,則返回 true


bool is_breaked() 🔗

如果附加的遠端實例正處於除錯迴圈中,則返回 true


bool is_debuggable() 🔗

如果附加的遠端實例可以除錯,則返回 true


void remove_session_tab(control: Control) 🔗

將給定的控制項 control 從底部除錯器面板的除錯會話 UI 中移除。


void send_message(message: String, data: Array = []) 🔗

向原生實例發送給定的消息 message,還可以傳入額外的資料 data。如何獲取這些消息見 EngineDebugger


void set_breakpoint(path: String, line: int, enabled: bool) 🔗

Enables or disables a specific breakpoint based on enabled, updating the Editor Breakpoint Panel accordingly.


void toggle_profiler(profiler: String, enable: bool, data: Array = []) 🔗

在所附加的遠端實例上開關給定的 profiler,還可以傳入額外的資料 data。詳見 EngineProfiler