From d425ca6b073a7bb8ea2d3f25984bd94f975b2d4e Mon Sep 17 00:00:00 2001 From: Samuel Susla Date: Wed, 13 Nov 2024 10:57:33 -0800 Subject: [PATCH] add nativeId to shadow node logs Summary: changelog: [internal] helpful for debugging. Differential Revision: D65895429 --- .../ReactCommon/react/renderer/core/ShadowNode.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/react-native/ReactCommon/react/renderer/core/ShadowNode.cpp b/packages/react-native/ReactCommon/react/renderer/core/ShadowNode.cpp index 814df904eef2c4..62827028223566 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/ShadowNode.cpp +++ b/packages/react-native/ReactCommon/react/renderer/core/ShadowNode.cpp @@ -365,7 +365,8 @@ std::string ShadowNode::getDebugName() const { std::string ShadowNode::getDebugValue() const { return "r" + folly::to(revision_) + "/sr" + folly::to(state_ ? state_->getRevision() : 0) + - (getSealed() ? "/sealed" : ""); + (getSealed() ? "/sealed" : "") + + (getProps()->nativeId.empty() ? "" : "/id=" + getProps()->nativeId); } SharedDebugStringConvertibleList ShadowNode::getDebugChildren() const {