From f18ca7db2e6f8caaf46026f27c030dac1f2e7015 Mon Sep 17 00:00:00 2001 From: Matt Blagden Date: Wed, 5 Jul 2023 15:19:41 -0700 Subject: [PATCH] Enable debugging in debug build Summary: Enable the preprocessor flag to allow debugging when in a debug build. This flag influences the Hermes headers included in the inspector, and causes them to include the debugging functionality. Changelog: [General][Fixed] - Re-enabled debugging for debug builds Differential Revision: D47243235 fbshipit-source-id: 3188f04de5eab8b34644a84c93083ea7a016be47 --- .../ReactCommon/hermes/inspector/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/react-native/ReactCommon/hermes/inspector/CMakeLists.txt b/packages/react-native/ReactCommon/hermes/inspector/CMakeLists.txt index 3dc0fba5de232d..c6a94c80d8430d 100644 --- a/packages/react-native/ReactCommon/hermes/inspector/CMakeLists.txt +++ b/packages/react-native/ReactCommon/hermes/inspector/CMakeLists.txt @@ -20,6 +20,14 @@ target_compile_options( -fexceptions ) +if(${CMAKE_BUILD_TYPE} MATCHES Debug) + target_compile_options( + hermes_inspector + PRIVATE + -DHERMES_ENABLE_DEBUGGER=1 + ) +endif() + target_include_directories(hermes_inspector PUBLIC ${REACT_COMMON_DIR}) target_link_libraries(hermes_inspector jsinspector