EditorDebuggerSession

继承: RefCounted < Object

与编辑器调试器交互的类。

描述

此类不能直接实例化,必须通过EditorDebuggerPlugin检索。

您可以通过add_session_tab()向会话UI添加选项卡,通过send_message()发送消息,并通过toggle_profiler()切换EngineProfiler

方法

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) 🔗

将给定的control添加到调试器底部面板中的调试会话UI。control的节点名称将用作选项卡标题。


bool is_active() 🔗

如果调试会话当前附加到远程实例,则返回true


bool is_breaked() 🔗

如果附加的远程实例当前在调试循环中,则返回true


bool is_debuggable() 🔗

如果可以调试附加的远程实例,则返回true


void remove_session_tab(control: Control) 🔗

从调试器底部面板的调试会话UI中删除给定的control


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

将给定的message发送到附加的远程实例,可选地传递额外的data。有关如何检索这些消息,请参阅EngineDebugger


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

根据enabled启用或禁用特定断点,相应地更新编辑器断点面板。


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

在附加的远程实例上切换给定的profiler,可选地传递额外的data。有关更多详细信息,请参阅EngineProfiler