Expose preprocessor flag for fuseboxEnabledDebug (#45167)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45167

Configures a `REACT_NATIVE_ENABLE_FUSEBOX_DEBUG` flag, and exposes this flag in the Buck target. This is an additional hook to enable the new debugger stack (codename Fusebox) as part of our internal rollout.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D59014161

fbshipit-source-id: f05e8b01ed07da90ef6d7a66ade05f462dd82023
This commit is contained in:
Alex Hunt
2024-06-26 03:53:54 -07:00
committed by Facebook GitHub Bot
parent 2dfb09c51a
commit 981141c9a1
2 changed files with 7 additions and 3 deletions
@@ -18,7 +18,7 @@ InspectorFlags& InspectorFlags::getInstance() {
}
bool InspectorFlags::getFuseboxEnabled() const {
return loadFlagsAndAssertUnchanged().fuseboxEnabledDebug;
return loadFlagsAndAssertUnchanged().fuseboxEnabled;
}
void InspectorFlags::dangerouslyResetFlags() {
@@ -28,11 +28,15 @@ void InspectorFlags::dangerouslyResetFlags() {
const InspectorFlags::Values& InspectorFlags::loadFlagsAndAssertUnchanged()
const {
InspectorFlags::Values newValues = {
.fuseboxEnabledDebug =
.fuseboxEnabled =
#ifdef REACT_NATIVE_FORCE_ENABLE_FUSEBOX
true,
#elif defined(HERMES_ENABLE_DEBUGGER)
#ifdef REACT_NATIVE_ENABLE_FUSEBOX_DEBUG
true,
#else
ReactNativeFeatureFlags::fuseboxEnabledDebug(),
#endif
#else
ReactNativeFeatureFlags::fuseboxEnabledRelease(),
#endif
@@ -32,7 +32,7 @@ class InspectorFlags {
private:
struct Values {
bool fuseboxEnabledDebug;
bool fuseboxEnabled;
bool operator==(const Values&) const = default;
};