EditorDebuggerSession
继承: RefCounted
< Object
A class to interact with the editor debugger.
描述
This class cannot be directly instantiated and must be retrieved via a EditorDebuggerPlugin
.
You can add tabs to the session UI via add_session_tab
, send messages via send_message
, and toggle EngineProfiler
s 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
)
Emitted when the attached remote instance enters a break state. If can_debug
is true
, the remote instance will enter the debug loop.
continued ( )
Emitted when the attached remote instance exits a break state.
started ( )
Emitted when a remote instance is attached to this session (i.e. the session becomes active).
stopped ( )
Emitted when a remote instance is detached from this session (i.e. the session becomes inactive).
方法说明
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 ( )
Returns true
if the debug session is currently attached to a remote instance.
bool
is_breaked ( )
Returns true
if the attached remote instance is currently in the debug loop.
bool
is_debuggable ( )
Returns true
if the attached remote instance can be debugged.
void
remove_session_tab ( control: Control
)
Removes the given control
from the debug session UI in the debugger bottom panel.
void
send_message ( message: String
, data: Array
= [] )
Sends the given message
to the attached remote instance, optionally passing additionally data
. See EngineDebugger
for how to retrieve those messages.
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
= [] )
Toggle the given profiler
on the attached remote instance, optionally passing additionally data
. See EngineProfiler
for more details.
本方法通常需要用户覆盖才能生效。
本方法无副作用,不会修改该实例的任何成员变量。
本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。
本方法用于构造某个类型。
调用本方法无需实例,可直接使用类名进行调用。
本方法描述的是使用本类型作为左操作数的有效运算符。
这个值是由下列位标志构成位掩码的整数。
无返回值。