From ed225faf31c9b3aa47154260aa1a7826d728acc8 Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Wed, 11 Mar 2020 11:23:21 +0100 Subject: 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). --- core/debugger/remote_debugger.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'core/debugger/remote_debugger.cpp') diff --git a/core/debugger/remote_debugger.cpp b/core/debugger/remote_debugger.cpp index 97d5c71b6f..18c9602eb2 100644 --- a/core/debugger/remote_debugger.cpp +++ b/core/debugger/remote_debugger.cpp @@ -673,6 +673,9 @@ void RemoteDebugger::debug(bool p_can_continue, bool p_is_error_breakpoint) { ERR_FAIL_COND_MSG(!is_peer_connected(), "Script Debugger failed to connect, but being used anyway."); + if (!peer->can_block()) + return; // Peer does not support blocking IO. We could at least send the error though. + ScriptLanguage *script_lang = script_debugger->get_break_language(); const String error_str = script_lang ? script_lang->debug_get_error() : ""; Array msg; @@ -886,13 +889,6 @@ Error RemoteDebugger::_profiler_capture(const String &p_cmd, const Array &p_data return OK; } -RemoteDebugger *RemoteDebugger::create_for_uri(const String &p_uri) { - Ref peer = RemoteDebuggerPeer::create_from_uri(p_uri); - if (peer.is_valid()) - return memnew(RemoteDebugger(peer)); - return nullptr; -} - RemoteDebugger::RemoteDebugger(Ref p_peer) { peer = p_peer; max_chars_per_second = GLOBAL_GET("network/limits/debugger/max_chars_per_second"); -- cgit v1.2.3