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

Method get_breakpoints

editor/script/script_editor_plugin.cpp:1962–1999  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1960}
1961
1962void ScriptEditor::get_breakpoints(List<String> *p_breakpoints) {
1963 HashSet<String> loaded_scripts;
1964 for (int i = 0; i < tab_container->get_tab_count(); i++) {
1965 ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_tab_control(i));
1966 if (!se) {
1967 continue;
1968 }
1969
1970 Ref<Script> scr = se->get_edited_resource();
1971 if (scr.is_null()) {
1972 continue;
1973 }
1974
1975 String base = scr->get_path();
1976 loaded_scripts.insert(base);
1977 if (base.is_empty() || base.begins_with("local://")) {
1978 continue;
1979 }
1980
1981 PackedInt32Array bpoints = se->get_breakpoints();
1982 for (int32_t bpoint : bpoints) {
1983 p_breakpoints->push_back(base + ":" + itos((int)bpoint + 1));
1984 }
1985 }
1986
1987 // Load breakpoints that are in closed scripts.
1988 Vector<String> cached_editors = script_editor_cache->get_sections();
1989 for (const String &E : cached_editors) {
1990 if (loaded_scripts.has(E)) {
1991 continue;
1992 }
1993
1994 Array breakpoints = _get_cached_breakpoints_for_script(E);
1995 for (int breakpoint : breakpoints) {
1996 p_breakpoints->push_back(E + ":" + itos((int)breakpoint + 1));
1997 }
1998 }
1999}
2000
2001void ScriptEditor::_members_overview_selected(int p_idx) {
2002 int line = members_overview->get_item_metadata(p_idx);

Callers 1

_get_breakpointsMethod · 0.45

Calls 12

itosFunction · 0.85
get_tab_controlMethod · 0.80
begins_withMethod · 0.80
get_tab_countMethod · 0.45
get_edited_resourceMethod · 0.45
is_nullMethod · 0.45
get_pathMethod · 0.45
insertMethod · 0.45
is_emptyMethod · 0.45
push_backMethod · 0.45
get_sectionsMethod · 0.45
hasMethod · 0.45

Tested by

no test coverage detected