summaryrefslogtreecommitdiff
path: root/editor/script_editor_debugger.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/script_editor_debugger.cpp')
-rw-r--r--editor/script_editor_debugger.cpp51
1 files changed, 26 insertions, 25 deletions
diff --git a/editor/script_editor_debugger.cpp b/editor/script_editor_debugger.cpp
index 625f6f670d..a83de1627d 100644
--- a/editor/script_editor_debugger.cpp
+++ b/editor/script_editor_debugger.cpp
@@ -735,25 +735,6 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
error_list->set_item_metadata(error_list->get_item_count() - 1, stack);
error_count++;
- /*
- int count = p_data[1];
-
- Array cstack;
-
- OutputError oe = errors.front()->get();
-
- packet_peer_stream->put_var(oe.hr);
- packet_peer_stream->put_var(oe.min);
- packet_peer_stream->put_var(oe.sec);
- packet_peer_stream->put_var(oe.msec);
- packet_peer_stream->put_var(oe.source_func);
- packet_peer_stream->put_var(oe.source_file);
- packet_peer_stream->put_var(oe.source_line);
- packet_peer_stream->put_var(oe.error);
- packet_peer_stream->put_var(oe.error_descr);
- packet_peer_stream->put_var(oe.warning);
- packet_peer_stream->put_var(oe.callstack);
- */
} else if (p_msg == "profile_sig") {
//cache a signature
@@ -780,6 +761,7 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
EditorProfiler::Metric::Category::Item item;
item.calls = 1;
item.line = 0;
+
item.name = "Physics Time";
item.total = metric.physics_time;
item.self = item.total;
@@ -817,8 +799,9 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
for (int i = 0; i < values.size(); i += 2) {
EditorProfiler::Metric::Category::Item item;
- item.name = values[i];
item.calls = 1;
+ item.line = 0;
+ item.name = values[i];
item.self = values[i + 1];
item.total = item.self;
item.signature = "categ::" + name + "::" + item.name;
@@ -973,7 +956,7 @@ void ScriptEditorDebugger::_notification(int p_what) {
inspector->edit(variables);
- copy->set_icon(get_icon("Duplicate", "EditorIcons"));
+ copy->set_icon(get_icon("ActionCopy", "EditorIcons"));
step->set_icon(get_icon("DebugStep", "EditorIcons"));
next->set_icon(get_icon("DebugNext", "EditorIcons"));
@@ -1185,6 +1168,16 @@ void ScriptEditorDebugger::_notification(int p_what) {
inspect_scene_tree->add_color_override("relationship_line_color", rl_color);
} else
inspect_scene_tree->add_constant_override("draw_relationship_lines", 0);
+
+ copy->set_icon(get_icon("ActionCopy", "EditorIcons"));
+ step->set_icon(get_icon("DebugStep", "EditorIcons"));
+ next->set_icon(get_icon("DebugNext", "EditorIcons"));
+ back->set_icon(get_icon("Back", "EditorIcons"));
+ forward->set_icon(get_icon("Forward", "EditorIcons"));
+ dobreak->set_icon(get_icon("Pause", "EditorIcons"));
+ docontinue->set_icon(get_icon("DebugContinue", "EditorIcons"));
+ vmem_refresh->set_icon(get_icon("Reload", "EditorIcons"));
+
} break;
}
}
@@ -1671,12 +1664,20 @@ void ScriptEditorDebugger::_error_selected(int p_idx) {
md.push_back(st[i + 1]);
md.push_back(st[i + 2]);
- String str = func + " in " + script.get_file() + ":line " + itos(line);
+ String str = func;
+ String tooltip_str = TTR("Function:") + " " + func;
+ if (script.length() > 0) {
+ str += " in " + script.get_file();
+ tooltip_str = TTR("File:") + " " + script + "\n" + tooltip_str;
+ if (line > 0) {
+ str += ":line " + itos(line);
+ tooltip_str += "\n" + TTR("Line:") + " " + itos(line);
+ }
+ }
error_stack->add_item(str);
error_stack->set_item_metadata(error_stack->get_item_count() - 1, md);
- error_stack->set_item_tooltip(error_stack->get_item_count() - 1,
- TTR("File:") + " " + script + "\n" + TTR("Function:") + " " + func + "\n" + TTR("Line:") + " " + itos(line));
+ error_stack->set_item_tooltip(error_stack->get_item_count() - 1, tooltip_str);
}
}
@@ -1759,7 +1760,7 @@ void ScriptEditorDebugger::_error_list_item_rmb_selected(int p_item, const Vecto
bool single_item_selected = error_list->get_selected_items().size() == 1;
if (single_item_selected) {
- item_menu->add_icon_item(get_icon("CopyNodePath", "EditorIcons"), TTR("Copy Error"), ITEM_MENU_COPY_ERROR);
+ item_menu->add_icon_item(get_icon("ActionCopy", "EditorIcons"), TTR("Copy Error"), ITEM_MENU_COPY_ERROR);
}
if (item_menu->get_item_count() > 0) {