You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Implemented advanced features of DAP
Respect client "supportsVariableType" capability Implement "breakpointLocations" request Implement "restart" request Implement "evaluate" request Fix error messages not being shown, and improved wrong path message Removed thread option and behavior Implemented detailed inspection of complex variables Fix "const"ness of functions Added a configurable timeout for requests Implement Godot custom data request/event Implement syncing of breakpoints Added support for debugging native platforms
This commit is contained in:
@@ -296,6 +296,7 @@ Size2 ScriptEditorDebugger::get_minimum_size() const {
|
||||
}
|
||||
|
||||
void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_data) {
|
||||
emit_signal(SNAME("debug_data"), p_msg, p_data);
|
||||
if (p_msg == "debug_enter") {
|
||||
_put_msg("get_stack_dump", Array());
|
||||
|
||||
@@ -872,6 +873,16 @@ void ScriptEditorDebugger::_clear_execution() {
|
||||
inspector->clear_stack_variables();
|
||||
}
|
||||
|
||||
void ScriptEditorDebugger::_set_breakpoint(const String &p_file, const int &p_line, const bool &p_enabled) {
|
||||
Ref<Script> script = ResourceLoader::load(p_file);
|
||||
emit_signal("set_breakpoint", script, p_line - 1, p_enabled);
|
||||
script.unref();
|
||||
}
|
||||
|
||||
void ScriptEditorDebugger::_clear_breakpoints() {
|
||||
emit_signal("clear_breakpoints");
|
||||
}
|
||||
|
||||
void ScriptEditorDebugger::start(Ref<RemoteDebuggerPeer> p_peer) {
|
||||
error_count = 0;
|
||||
warning_count = 0;
|
||||
@@ -1503,6 +1514,9 @@ void ScriptEditorDebugger::_bind_methods() {
|
||||
ADD_SIGNAL(MethodInfo("stack_dump", PropertyInfo(Variant::ARRAY, "stack_dump")));
|
||||
ADD_SIGNAL(MethodInfo("stack_frame_vars", PropertyInfo(Variant::INT, "num_vars")));
|
||||
ADD_SIGNAL(MethodInfo("stack_frame_var", PropertyInfo(Variant::ARRAY, "data")));
|
||||
ADD_SIGNAL(MethodInfo("debug_data", PropertyInfo(Variant::STRING, "msg"), PropertyInfo(Variant::ARRAY, "data")));
|
||||
ADD_SIGNAL(MethodInfo("set_breakpoint", PropertyInfo("script"), PropertyInfo(Variant::INT, "line"), PropertyInfo(Variant::BOOL, "enabled")));
|
||||
ADD_SIGNAL(MethodInfo("clear_breakpoints"));
|
||||
}
|
||||
|
||||
void ScriptEditorDebugger::add_debugger_plugin(const Ref<Script> &p_script) {
|
||||
|
||||
Reference in New Issue
Block a user