MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / _clear_breakpoints

Method _clear_breakpoints

editor/script/script_editor_plugin.cpp:610–632  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

608}
609
610void ScriptEditor::_clear_breakpoints() {
611 for (int i = 0; i < tab_container->get_tab_count(); i++) {
612 ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_tab_control(i));
613 if (se) {
614 se->clear_breakpoints();
615 }
616 }
617
618 // Clear from closed scripts.
619 Vector<String> cached_editors = script_editor_cache->get_sections();
620 for (const String &E : cached_editors) {
621 Array breakpoints = _get_cached_breakpoints_for_script(E);
622 for (int breakpoint : breakpoints) {
623 EditorDebuggerNode::get_singleton()->set_breakpoint(E, (int)breakpoint + 1, false);
624 }
625
626 if (breakpoints.size() > 0) {
627 Dictionary state = script_editor_cache->get_value(E, "state");
628 state["breakpoints"] = Array();
629 script_editor_cache->set_value(E, "state", state);
630 }
631 }
632}
633
634Array ScriptEditor::_get_cached_breakpoints_for_script(const String &p_path) const {
635 if (!ResourceLoader::exists(p_path, "Script") || p_path.begins_with("local://") || !script_editor_cache->has_section_key(p_path, "state")) {

Callers

nothing calls this directly

Calls 9

get_tab_controlMethod · 0.80
sizeMethod · 0.65
ArrayClass · 0.50
get_tab_countMethod · 0.45
clear_breakpointsMethod · 0.45
get_sectionsMethod · 0.45
set_breakpointMethod · 0.45
get_valueMethod · 0.45
set_valueMethod · 0.45

Tested by

no test coverage detected