EditorDebuggerSession
继承: RefCounted < Object
与编辑器调试器交互的类。
描述
这个类不能直接实例化,必须通过 EditorDebuggerPlugin 来获取。
通过 add_session_tab 可以向会话 UI 添加标签,通过 send_message 可以发送消息,通过 toggle_profiler 可以切换 EngineProfiler。
方法
void | add_session_tab(control: Control) |
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 = []) |
信号
当连接的远程实例进入中断状态时发出。如果 can_debug
为 true
,则远程实例将进入调试循环。
continued() 🔗
当连接的远程实例退出中断状态时触发。
started() 🔗
当一个远程实例连接到该会话时触发(即该会话成为活动状态)。
stopped() 🔗
当一个远程实例从该会话中分离出来时(即该会话变为非活动状态)发出。
方法说明
void add_session_tab(control: Control) 🔗
将给定的控件 control
添加到底部调试器面板的调试会话 UI 中。
如果调试会话附加到了某个远程实例,则返回 true
。
如果附加的远程实例正处于调试循环中,则返回 true
。
如果附加的远程实例可以调试,则返回 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) 🔗
根据 enabled
启用或禁用指定的断点,会据此更新“编辑器断点面板”。
void toggle_profiler(profiler: String, enable: bool, data: Array = []) 🔗
在所附加的远程实例上开关给定的 profiler
,还可以传入额外的数据 data
。详见 EngineProfiler。