diff options
author | iwek7 <miwanczuk7@gmail.com> | 2019-07-29 20:09:22 +0200 |
---|---|---|
committer | iwek7 <miwanczuk7@gmail.com> | 2019-09-03 20:49:09 +0200 |
commit | 617797c47cac39830282b7ea85fc38eb2d242e19 (patch) | |
tree | 3a13d873fc96c1f7e02718269d55a0cc9234ad7a /core/script_debugger_remote.cpp | |
parent | 750f8d4926edb14269d9f6a117c5a9fd4765373a (diff) | |
download | redot-engine-617797c47cac39830282b7ea85fc38eb2d242e19.tar.gz |
Adds skip-breakpoints feature
Diffstat (limited to 'core/script_debugger_remote.cpp')
-rw-r--r-- | core/script_debugger_remote.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/core/script_debugger_remote.cpp b/core/script_debugger_remote.cpp index 2a061f0947..0b2b7368d2 100644 --- a/core/script_debugger_remote.cpp +++ b/core/script_debugger_remote.cpp @@ -129,11 +129,14 @@ void ScriptDebuggerRemote::_save_node(ObjectID id, const String &p_path) { ResourceSaver::save(p_path, ps); } -void ScriptDebuggerRemote::debug(ScriptLanguage *p_script, bool p_can_continue) { +void ScriptDebuggerRemote::debug(ScriptLanguage *p_script, bool p_can_continue, bool p_is_error_breakpoint) { //this function is called when there is a debugger break (bug on script) //or when execution is paused from editor + if (skip_breakpoints && !p_is_error_breakpoint) + return; + ERR_FAIL_COND_MSG(!tcp_client->is_connected_to_host(), "Script Debugger failed to connect, but being used anyway."); packet_peer_stream->put_var("debug_enter"); @@ -155,6 +158,7 @@ void ScriptDebuggerRemote::debug(ScriptLanguage *p_script, bool p_can_continue) Variant var; Error err = packet_peer_stream->get_var(var); + ERR_CONTINUE(err != OK); ERR_CONTINUE(var.get_type() != Variant::ARRAY); @@ -266,7 +270,6 @@ void ScriptDebuggerRemote::debug(ScriptLanguage *p_script, bool p_can_continue) break; } else if (command == "continue") { - set_depth(-1); set_lines_left(-1); OS::get_singleton()->move_window_to_foreground(); @@ -302,6 +305,8 @@ void ScriptDebuggerRemote::debug(ScriptLanguage *p_script, bool p_can_continue) } else if (command == "save_node") { _save_node(cmd[1], cmd[2]); + } else if (command == "set_skip_breakpoints") { + skip_breakpoints = cmd[1]; } else { _parse_live_edit(cmd); } @@ -773,6 +778,8 @@ void ScriptDebuggerRemote::_poll_events() { insert_breakpoint(cmd[2], cmd[1]); else remove_breakpoint(cmd[2], cmd[1]); + } else if (command == "set_skip_breakpoints") { + skip_breakpoints = cmd[1]; } else { _parse_live_edit(cmd); } @@ -1102,6 +1109,10 @@ void ScriptDebuggerRemote::profiling_set_frame_times(float p_frame_time, float p physics_frame_time = p_physics_frame_time; } +void ScriptDebuggerRemote::set_skip_breakpoints(bool p_skip_breakpoints) { + skip_breakpoints = p_skip_breakpoints; +} + ScriptDebuggerRemote::ResourceUsageFunc ScriptDebuggerRemote::resource_usage_func = NULL; ScriptDebuggerRemote::ScriptDebuggerRemote() : |