diff --git a/source/simulation2/serialization/DebugSerializer.cpp b/source/simulation2/serialization/DebugSerializer.cpp index 9658080431..ae4c08713f 100644 --- a/source/simulation2/serialization/DebugSerializer.cpp +++ b/source/simulation2/serialization/DebugSerializer.cpp @@ -154,12 +154,11 @@ void CDebugSerializer::PutScriptVal(const char* name, JS::MutableHandleValue val JS::RootedValue serialize(rq.cx); if (m_ScriptInterface.GetProperty(value, "Serialize", &serialize) && !serialize.isNullOrUndefined()) { - // If the value has a Serialize property, pretty-parse that and return the value as a raw string. - // This gives more debug data for components in case of OOS. + // If the value has a Serialize property, pretty-parse that instead. + // (this gives more accurate OOS reports). m_ScriptInterface.CallFunction(value, "Serialize", &serialize); std::string serialized_source = m_ScriptInterface.ToString(&serialize, true); - std::string source = m_ScriptInterface.ToString(value, false); - m_Stream << INDENT << name << ": " << serialized_source << " (raw: " << source << ")\n"; + m_Stream << INDENT << name << ": " << serialized_source << "\n"; } else { diff --git a/source/simulation2/tests/test_ComponentManager.h b/source/simulation2/tests/test_ComponentManager.h index ee601d799d..3d62d0ac49 100644 --- a/source/simulation2/tests/test_ComponentManager.h +++ b/source/simulation2/tests/test_ComponentManager.h @@ -802,7 +802,7 @@ entities:\n\ TestScript1_custom:\n\ comp: {\n\ \"c\": 1\n\ -} (raw: ({y:2}))\n\ +}\n\ \n" );