summaryrefslogtreecommitdiff
path: root/editor/script_editor_debugger.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/script_editor_debugger.cpp')
-rw-r--r--editor/script_editor_debugger.cpp29
1 files changed, 28 insertions, 1 deletions
diff --git a/editor/script_editor_debugger.cpp b/editor/script_editor_debugger.cpp
index fc5aecdbe9..a4270786c1 100644
--- a/editor/script_editor_debugger.cpp
+++ b/editor/script_editor_debugger.cpp
@@ -201,6 +201,21 @@ void ScriptEditorDebugger::debug_copy() {
OS::get_singleton()->set_clipboard(msg);
}
+void ScriptEditorDebugger::debug_skip_breakpoints() {
+ skip_breakpoints_value = !skip_breakpoints_value;
+ if (skip_breakpoints_value)
+ skip_breakpoints->set_icon(get_icon("DebugSkipBreakpointsOn", "EditorIcons"));
+ else
+ skip_breakpoints->set_icon(get_icon("DebugSkipBreakpointsOff", "EditorIcons"));
+
+ if (connection.is_valid()) {
+ Array msg;
+ msg.push_back("set_skip_breakpoints");
+ msg.push_back(skip_breakpoints_value);
+ ppeer->put_var(msg);
+ }
+}
+
void ScriptEditorDebugger::debug_next() {
ERR_FAIL_COND(!breaked);
@@ -1083,7 +1098,7 @@ void ScriptEditorDebugger::_notification(int p_what) {
case NOTIFICATION_ENTER_TREE: {
inspector->edit(variables);
-
+ skip_breakpoints->set_icon(get_icon("DebugSkipBreakpointsOff", "EditorIcons"));
copy->set_icon(get_icon("ActionCopy", "EditorIcons"));
step->set_icon(get_icon("DebugStep", "EditorIcons"));
@@ -1785,6 +1800,10 @@ void ScriptEditorDebugger::reload_scripts() {
}
}
+bool ScriptEditorDebugger::is_skip_breakpoints() {
+ return skip_breakpoints_value;
+}
+
void ScriptEditorDebugger::_error_activated() {
TreeItem *selected = error_tree->get_selected();
@@ -1980,6 +1999,7 @@ void ScriptEditorDebugger::_bind_methods() {
ClassDB::bind_method(D_METHOD("_stack_dump_frame_selected"), &ScriptEditorDebugger::_stack_dump_frame_selected);
+ ClassDB::bind_method(D_METHOD("debug_skip_breakpoints"), &ScriptEditorDebugger::debug_skip_breakpoints);
ClassDB::bind_method(D_METHOD("debug_copy"), &ScriptEditorDebugger::debug_copy);
ClassDB::bind_method(D_METHOD("debug_next"), &ScriptEditorDebugger::debug_next);
@@ -2067,6 +2087,13 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) {
hbc->add_child(memnew(VSeparator));
+ skip_breakpoints = memnew(ToolButton);
+ hbc->add_child(skip_breakpoints);
+ skip_breakpoints->set_tooltip(TTR("Skip Breakpoints"));
+ skip_breakpoints->connect("pressed", this, "debug_skip_breakpoints");
+
+ hbc->add_child(memnew(VSeparator));
+
copy = memnew(ToolButton);
hbc->add_child(copy);
copy->set_tooltip(TTR("Copy Error"));