Merge pull request #22522 from DualMatrix/debugging_the_debugger_3

Fixed debugger showing wrong name for Objects.
This commit is contained in:
Rémi Verschelde 2018-09-29 22:43:41 +02:00 committed by GitHub
commit e1dc8e4e99
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -577,12 +577,9 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
String hs = String();
if (v.get_type() == Variant::OBJECT) {
v = Object::cast_to<EncodedObjectAsID>(v)->get_object_id();
h = PROPERTY_HINT_OBJECT_ID;
v = ObjectDB::get_instance(Object::cast_to<EncodedObjectAsID>(v)->get_object_id());
String s = v;
s = s.replace("[", "");
hs = s.get_slice(":", 0);
v = s.get_slice(":", 1).to_int();
hs = "Object";
}
variables->add_property("Locals/" + n, v, h, hs);
@ -599,12 +596,9 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
String hs = String();
if (v.get_type() == Variant::OBJECT) {
v = Object::cast_to<EncodedObjectAsID>(v)->get_object_id();
h = PROPERTY_HINT_OBJECT_ID;
v = ObjectDB::get_instance(Object::cast_to<EncodedObjectAsID>(v)->get_object_id());
String s = v;
s = s.replace("[", "");
hs = s.get_slice(":", 0);
v = s.get_slice(":", 1).to_int();
hs = "Object";
}
variables->add_property("Members/" + n, v, h, hs);
@ -621,12 +615,9 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
String hs = String();
if (v.get_type() == Variant::OBJECT) {
v = Object::cast_to<EncodedObjectAsID>(v)->get_object_id();
h = PROPERTY_HINT_OBJECT_ID;
v = ObjectDB::get_instance(Object::cast_to<EncodedObjectAsID>(v)->get_object_id());
String s = v;
s = s.replace("[", "");
hs = s.get_slice(":", 0);
v = s.get_slice(":", 1).to_int();
hs = "Object";
}
variables->add_property("Globals/" + n, v, h, hs);