Show correct debug tooltips for existing variables

This commit is contained in:
Jummit 2021-09-15 18:04:44 +02:00
parent a5c299630d
commit 1260735ee6

View file

@ -265,5 +265,11 @@ void EditorDebuggerInspector::clear_stack_variables() {
}
String EditorDebuggerInspector::get_stack_variable(const String &p_var) {
return variables->get_variant(p_var);
for (Map<StringName, Variant>::Element *E = variables->prop_values.front(); E; E = E->next()) {
String v = E->key().operator String();
if (v.get_slice("/", 1) == p_var) {
return variables->get_variant(v);
}
}
return String();
}