diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2020-03-11 11:23:21 +0100 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2020-05-12 15:09:13 +0200 |
commit | ed225faf31c9b3aa47154260aa1a7826d728acc8 (patch) | |
tree | 9b4ae87b8b500582afd4d1501e98471b874d4d28 /core/debugger/engine_debugger.h | |
parent | beb87504e076afeb37e5f2765c8417f92a044e13 (diff) | |
download | redot-engine-ed225faf31c9b3aa47154260aa1a7826d728acc8.tar.gz |
Add support for multiple RemoteDebuggerPeer(s).
It is now possible to register protocol handlers (default tcp://) to
support additional debugging communication layers (e.g. websocket).
Diffstat (limited to 'core/debugger/engine_debugger.h')
-rw-r--r-- | core/debugger/engine_debugger.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/debugger/engine_debugger.h b/core/debugger/engine_debugger.h index 7b6b77ca9b..8d5ebb2394 100644 --- a/core/debugger/engine_debugger.h +++ b/core/debugger/engine_debugger.h @@ -38,6 +38,7 @@ #include "core/variant.h" #include "core/vector.h" +class RemoteDebuggerPeer; class ScriptDebugger; class EngineDebugger { @@ -45,8 +46,11 @@ public: typedef void (*ProfilingToggle)(void *p_user, bool p_enable, const Array &p_opts); typedef void (*ProfilingTick)(void *p_user, float p_frame_time, float p_idle_time, float p_physics_time, float p_physics_frame_time); typedef void (*ProfilingAdd)(void *p_user, const Array &p_arr); + typedef Error (*CaptureFunc)(void *p_user, const String &p_msg, const Array &p_args, bool &r_captured); + typedef RemoteDebuggerPeer *(*CreatePeerFunc)(const String &p_uri); + class Profiler { friend class EngineDebugger; @@ -94,6 +98,7 @@ protected: static Map<StringName, Profiler> profilers; static Map<StringName, Capture> captures; + static Map<String, CreatePeerFunc> protocols; public: _FORCE_INLINE_ static EngineDebugger *get_singleton() { return singleton; } @@ -113,6 +118,8 @@ public: static void unregister_message_capture(const StringName &p_name); static bool has_capture(const StringName &p_name); + static void register_uri_handler(const String &p_protocol, CreatePeerFunc p_func); + void iteration(uint64_t p_frame_ticks, uint64_t p_idle_ticks, uint64_t p_physics_ticks, float p_physics_frame_time); void profiler_enable(const StringName &p_name, bool p_enabled, const Array &p_opts = Array()); Error capture_parse(const StringName &p_name, const String &p_msg, const Array &p_args, bool &r_captured); |