From 540ca05a80e23daafa191cdf24c07b3f8e37b47a Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Mon, 24 Feb 2020 06:21:15 +0100 Subject: Threaded networking for editor debugger. --- modules/mono/mono_gd/gd_mono_utils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/mono/mono_gd/gd_mono_utils.cpp') diff --git a/modules/mono/mono_gd/gd_mono_utils.cpp b/modules/mono/mono_gd/gd_mono_utils.cpp index 41f49d8ac9..b3a573bcd4 100644 --- a/modules/mono/mono_gd/gd_mono_utils.cpp +++ b/modules/mono/mono_gd/gd_mono_utils.cpp @@ -39,7 +39,7 @@ #include "core/reference.h" #ifdef TOOLS_ENABLED -#include "editor/debugger/script_editor_debugger.h" +#include "editor/debugger/editor_debugger_node.h" #endif #include "../csharp_script.h" -- cgit v1.2.3 From b8ddaf9c33107e01928e04ed462aa08d4017247b Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Thu, 27 Feb 2020 03:30:20 +0100 Subject: Refactor ScriptDebugger. EngineDebugger is the new interface to access the debugger. It tries to be as agnostic as possible on the data that various subsystems can expose. It allows 2 types of interactions: - Profilers: A subsystem can register a profiler, assigning it a unique name. That name can be used to activate the profiler or add data to it. The registered profiler can be composed of up to 3 functions: - Toggle: called when the profiler is activated/deactivated. - Add: called whenever data is added to the debugger (via `EngineDebugger::profiler_add_frame_data`) - Tick: called every frame (during idle), receives frame times. - Captures: (Only relevant in remote debugger for now) A subsystem can register a capture, assigning it a unique name. When receiving a message, the remote debugger will check if it starts with `[prefix]:` and call the associated capture with name `prefix`. Port MultiplayerAPI, Servers, Scripts, Visual, Performance to the new profiler system. Port SceneDebugger and RemoteDebugger to the new capture system. The LocalDebugger also uses the new profiler system for scripts profiling. --- modules/mono/mono_gd/gd_mono_utils.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'modules/mono/mono_gd/gd_mono_utils.cpp') diff --git a/modules/mono/mono_gd/gd_mono_utils.cpp b/modules/mono/mono_gd/gd_mono_utils.cpp index b3a573bcd4..bc290f3a7f 100644 --- a/modules/mono/mono_gd/gd_mono_utils.cpp +++ b/modules/mono/mono_gd/gd_mono_utils.cpp @@ -32,6 +32,8 @@ #include +#include "core/debugger/engine_debugger.h" +#include "core/debugger/script_debugger.h" #include "core/os/dir_access.h" #include "core/os/mutex.h" #include "core/os/os.h" @@ -351,7 +353,7 @@ void debug_print_unhandled_exception(MonoException *p_exc) { void debug_send_unhandled_exception_error(MonoException *p_exc) { #ifdef DEBUG_ENABLED - if (!ScriptDebugger::get_singleton()) { + if (!EngineDebugger::is_active()) { #ifdef TOOLS_ENABLED if (Engine::get_singleton()->is_editor_hint()) { ERR_PRINT(GDMonoUtils::get_exception_name_and_message(p_exc)); @@ -410,7 +412,7 @@ void debug_send_unhandled_exception_error(MonoException *p_exc) { int line = si.size() ? si[0].line : __LINE__; String error_msg = "Unhandled exception"; - ScriptDebugger::get_singleton()->send_error(func, file, line, error_msg, exc_msg, ERR_HANDLER_ERROR, si); + EngineDebugger::get_script_debugger()->send_error(func, file, line, error_msg, exc_msg, ERR_HANDLER_ERROR, si); #endif } -- cgit v1.2.3