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

Method _add_debugger

editor/debugger/editor_debugger_node.cpp:111–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109}
110
111ScriptEditorDebugger *EditorDebuggerNode::_add_debugger() {
112 ScriptEditorDebugger *node = memnew(ScriptEditorDebugger);
113
114 int id = tabs->get_tab_count();
115 node->connect("stop_requested", callable_mp(this, &EditorDebuggerNode::_debugger_wants_stop).bind(id));
116 node->connect("stopped", callable_mp(this, &EditorDebuggerNode::_debugger_stopped).bind(id));
117 node->connect("stack_frame_selected", callable_mp(this, &EditorDebuggerNode::_stack_frame_selected).bind(id));
118 node->connect("error_selected", callable_mp(this, &EditorDebuggerNode::_error_selected).bind(id));
119 node->connect("breakpoint_selected", callable_mp(this, &EditorDebuggerNode::_error_selected).bind(id));
120 node->connect("clear_execution", callable_mp(this, &EditorDebuggerNode::_clear_execution));
121 node->connect("breaked", callable_mp(this, &EditorDebuggerNode::_breaked).bind(id));
122 node->connect("debug_data", callable_mp(this, &EditorDebuggerNode::_debug_data).bind(id));
123 node->connect("remote_tree_select_requested", callable_mp(this, &EditorDebuggerNode::_remote_tree_select_requested).bind(id));
124 node->connect("remote_tree_clear_selection_requested", callable_mp(this, &EditorDebuggerNode::_remote_tree_clear_selection_requested).bind(id));
125 node->connect("remote_tree_updated", callable_mp(this, &EditorDebuggerNode::_remote_tree_updated).bind(id));
126 node->connect("remote_objects_updated", callable_mp(this, &EditorDebuggerNode::_remote_objects_updated).bind(id));
127 node->connect("remote_object_property_updated", callable_mp(this, &EditorDebuggerNode::_remote_object_property_updated).bind(id));
128 node->connect("remote_objects_requested", callable_mp(this, &EditorDebuggerNode::_remote_objects_requested).bind(id));
129 node->connect("set_breakpoint", callable_mp(this, &EditorDebuggerNode::_breakpoint_set_in_tree).bind(id));
130 node->connect("clear_breakpoints", callable_mp(this, &EditorDebuggerNode::_breakpoints_cleared_in_tree).bind(id));
131 node->connect("errors_cleared", callable_mp(this, &EditorDebuggerNode::_update_errors));
132
133 if (tabs->get_tab_count() > 0) {
134 get_debugger(0)->clear_style();
135 }
136
137 tabs->add_child(node);
138
139 node->set_name(vformat(TTR("Session %d"), tabs->get_tab_count()));
140 if (tabs->get_tab_count() > 1) {
141 node->clear_style();
142 tabs->set_tabs_visible(true);
143 tabs->add_theme_style_override(SceneStringName(panel), EditorNode::get_singleton()->get_editor_theme()->get_stylebox(SNAME("DebuggerPanel"), EditorStringName(EditorStyles)));
144 }
145
146 if (!debugger_plugins.is_empty()) {
147 for (Ref<EditorDebuggerPlugin> plugin : debugger_plugins) {
148 plugin->create_session(node);
149 }
150 }
151
152 return node;
153}
154
155void EditorDebuggerNode::_stack_frame_selected(int p_debugger) {
156 const ScriptEditorDebugger *dbg = get_debugger(p_debugger);

Callers

nothing calls this directly

Calls 14

vformatFunction · 0.85
TTRFunction · 0.85
clear_styleMethod · 0.80
set_tabs_visibleMethod · 0.80
connectMethod · 0.65
get_tab_countMethod · 0.45
bindMethod · 0.45
add_childMethod · 0.45
set_nameMethod · 0.45
get_styleboxMethod · 0.45
get_editor_themeMethod · 0.45

Tested by

no test coverage detected