Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

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 ( String message, Array data=[] )

void

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


信号

breaked ( bool can_debug )

当连接的远程实例进入中断状态时发出。如果 can_debugtrue,则远程实例将进入调试循环。


continued ( )

当连接的远程实例退出中断状态时触发。


started ( )

当一个远程实例连接到该会话时触发(即该会话成为活动状态)。


stopped ( )

当一个远程实例从该会话中分离出来时(即该会话变为非活动状态)发出。


方法说明

void add_session_tab ( Control control )

将给定的控件 control 添加到底部调试器面板的调试会话 UI 中。


bool is_active ( )

如果调试会话附加到了某个远程实例,则返回 true


bool is_breaked ( )

如果附加的远程实例正处于调试循环中,则返回 true


bool is_debuggable ( )

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


void remove_session_tab ( Control control )

将给定的控件 control 从底部调试器面板的调试会话 UI 中移除。


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

向原生实例发送给定的消息 message,还可以传入额外的数据 data。如何获取这些消息见 EngineDebugger


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

在所附加的远程实例上开关给定的 profiler,还可以传入额外的数据 data。详见 EngineProfiler