diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/editor/plugins/script_editor_plugin.cpp | 1 | ||||
-rw-r--r-- | tools/editor/script_editor_debugger.cpp | 13 | ||||
-rw-r--r-- | tools/editor/script_editor_debugger.h | 2 |
3 files changed, 16 insertions, 0 deletions
diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp index 3ef240e74c..302e4f2196 100644 --- a/tools/editor/plugins/script_editor_plugin.cpp +++ b/tools/editor/plugins/script_editor_plugin.cpp @@ -1101,6 +1101,7 @@ void ScriptEditor::_menu_option(int p_option) { int line=current->get_text_edit()->cursor_get_line(); bool dobreak = !current->get_text_edit()->is_line_set_as_breakpoint(line); current->get_text_edit()->set_line_as_breakpoint(line,dobreak); + get_debugger()->set_breakpoint(current->get_edited_script()->get_path(),line+1,dobreak); } break; case DEBUG_NEXT: { diff --git a/tools/editor/script_editor_debugger.cpp b/tools/editor/script_editor_debugger.cpp index 7ef1be0da4..2e1fa2814e 100644 --- a/tools/editor/script_editor_debugger.cpp +++ b/tools/editor/script_editor_debugger.cpp @@ -1078,6 +1078,19 @@ void ScriptEditorDebugger::live_debug_reparent_node(const NodePath& p_at, const } +void ScriptEditorDebugger::set_breakpoint(const String& p_path,int p_line,bool p_enabled) { + + if (connection.is_valid()) { + Array msg; + msg.push_back("breakpoint"); + msg.push_back(p_path); + msg.push_back(p_line); + msg.push_back(p_enabled); + ppeer->put_var(msg); + } +} + + void ScriptEditorDebugger::_error_selected(int p_idx) { error_stack->clear(); diff --git a/tools/editor/script_editor_debugger.h b/tools/editor/script_editor_debugger.h index f8e943df9b..3c66dde340 100644 --- a/tools/editor/script_editor_debugger.h +++ b/tools/editor/script_editor_debugger.h @@ -173,6 +173,8 @@ public: void live_debug_duplicate_node(const NodePath& p_at,const String& p_new_name); void live_debug_reparent_node(const NodePath& p_at,const NodePath& p_new_place,const String& p_new_name,int p_at_pos); + void set_breakpoint(const String& p_path,int p_line,bool p_enabled); + void update_live_edit_root(); |