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

Method _get_breakpoints

editor/script/script_editor_plugin.cpp:1921–1960  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1919}
1920
1921Vector<String> ScriptEditor::_get_breakpoints() {
1922 Vector<String> ret;
1923 HashSet<String> loaded_scripts;
1924 for (int i = 0; i < tab_container->get_tab_count(); i++) {
1925 ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_tab_control(i));
1926 if (!se) {
1927 continue;
1928 }
1929
1930 Ref<Script> scr = se->get_edited_resource();
1931 if (scr.is_null()) {
1932 continue;
1933 }
1934
1935 String base = scr->get_path();
1936 loaded_scripts.insert(base);
1937 if (base.is_empty() || base.begins_with("local://")) {
1938 continue;
1939 }
1940
1941 PackedInt32Array bpoints = se->get_breakpoints();
1942 for (int32_t bpoint : bpoints) {
1943 ret.push_back(base + ":" + itos((int)bpoint + 1));
1944 }
1945 }
1946
1947 // Load breakpoints that are in closed scripts.
1948 Vector<String> cached_editors = script_editor_cache->get_sections();
1949 for (const String &E : cached_editors) {
1950 if (loaded_scripts.has(E)) {
1951 continue;
1952 }
1953
1954 Array breakpoints = _get_cached_breakpoints_for_script(E);
1955 for (int breakpoint : breakpoints) {
1956 ret.push_back(E + ":" + itos((int)breakpoint + 1));
1957 }
1958 }
1959 return ret;
1960}
1961
1962void ScriptEditor::get_breakpoints(List<String> *p_breakpoints) {
1963 HashSet<String> loaded_scripts;

Callers

nothing calls this directly

Calls 13

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
get_breakpointsMethod · 0.45
push_backMethod · 0.45
get_sectionsMethod · 0.45

Tested by

no test coverage detected