From 5141239f47a919002c7f60e7288671ad7fd1921b Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Wed, 14 Jun 2023 02:07:54 -0700 Subject: [PATCH 1/2] Re-enable direct debugging with JSC on iOS 16.4+ --- packages/react-native/ReactCommon/jsc/JSCRuntime.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/react-native/ReactCommon/jsc/JSCRuntime.cpp b/packages/react-native/ReactCommon/jsc/JSCRuntime.cpp index fea1d0bc2d33c7..566b1598c3f2c2 100644 --- a/packages/react-native/ReactCommon/jsc/JSCRuntime.cpp +++ b/packages/react-native/ReactCommon/jsc/JSCRuntime.cpp @@ -398,6 +398,11 @@ JSCRuntime::JSCRuntime(JSGlobalContextRef ctx) stringCounter_(0) #endif { +#ifndef NDEBUG + if (__builtin_available(macOS 13.3, iOS 16.4, tvOS 16.4, *)) { + JSGlobalContextSetInspectable(ctx_, true); + } +#endif } JSCRuntime::~JSCRuntime() { From 2bf43481f23a665da77c03eb6b1949cd7282d12e Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Wed, 14 Jun 2023 14:42:23 -0700 Subject: [PATCH 2/2] Update packages/react-native/ReactCommon/jsc/JSCRuntime.cpp Co-authored-by: Tommy Nguyen <4123478+tido64@users.noreply.github.com> --- packages/react-native/ReactCommon/jsc/JSCRuntime.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/react-native/ReactCommon/jsc/JSCRuntime.cpp b/packages/react-native/ReactCommon/jsc/JSCRuntime.cpp index 566b1598c3f2c2..93f20b828f0a93 100644 --- a/packages/react-native/ReactCommon/jsc/JSCRuntime.cpp +++ b/packages/react-native/ReactCommon/jsc/JSCRuntime.cpp @@ -399,9 +399,9 @@ JSCRuntime::JSCRuntime(JSGlobalContextRef ctx) #endif { #ifndef NDEBUG - if (__builtin_available(macOS 13.3, iOS 16.4, tvOS 16.4, *)) { - JSGlobalContextSetInspectable(ctx_, true); - } + if (__builtin_available(macOS 13.3, iOS 16.4, tvOS 16.4, *)) { + JSGlobalContextSetInspectable(ctx_, true); + } #endif }