diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-05-12 18:02:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-12 18:02:38 +0200 |
commit | 2231673d42a9f20c8778b068102ae46261a6fb69 (patch) | |
tree | 9d93f43c983398f96e6a5ae7f39d80559398402a /core/debugger/remote_debugger.cpp | |
parent | 6dfea347b0f957e2689a127f025988f9aae1ab71 (diff) | |
parent | 3097c2da963fe355c81816a74824170b6dce697c (diff) |
Merge pull request #37099 from Faless/js/debugger_4.0
WebSocket profiler for HTML5 platform [4.0]
Diffstat (limited to 'core/debugger/remote_debugger.cpp')
-rw-r--r-- | core/debugger/remote_debugger.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
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<RemoteDebuggerPeer> peer = RemoteDebuggerPeer::create_from_uri(p_uri); - if (peer.is_valid()) - return memnew(RemoteDebugger(peer)); - return nullptr; -} - RemoteDebugger::RemoteDebugger(Ref<RemoteDebuggerPeer> p_peer) { peer = p_peer; max_chars_per_second = GLOBAL_GET("network/limits/debugger/max_chars_per_second"); |