Skip to content

Fixed Reflex Debugger to support Unity Build Profiles - #156

Open
EduardSmilyi wants to merge 2 commits into
gustavopsantos:mainfrom
EduardSmilyi:main
Open

EduardSmilyi wants to merge 2 commits into
gustavopsantos:mainfrom
EduardSmilyi:main

Conversation

@EduardSmilyi

Copy link
Copy Markdown

Fixed Reflex Debugger to support Unity Build Profiles

Description

Motivation and issue: In a Unity project with Build Profiles, we use Scripting Defines with REFLEX_DEBUG that extend the Scripting Define Symbols. As a result, the Reflex Debugger (which relies on the Scripting Define Symbols) refuses to show debug information, even though REFLEX_DEBUG is enabled and performance is impacted!

Fixed Reflex Debugger to display the real state of REFLEX_DEBUG using preprocessor checks

  • Introduced DebuggerState enum with flags for better state tracking.
  • Refactored how REFLEX_DEBUG is checked using a helper method.
  • Improved the tooltip with detailed state information.
  • Added compilation request and warnings for specific scenarios.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Prepared release: https://github.com/EduardSmilyi/Reflex.git?path=/Assets/Reflex/#14.4.0

  • Regression test: Review the previous functionality of the Reflex Debugger
  • REFLEX_DEBUG set in Build Profile/Scripting Defines.
    • Create new Build Profile
    • Use "Add Settings > Scripting Defines" and add REFLEX_DEBUG
    • Check that Reflex Debugger works and doesn't allow adding REFLEX_DEBUG to Scripting Define Symbols on the debug button press
  • REFLEX_DEBUG set in Build Profile/Scripting Defines and Scripting Define Symbols
    • Open Reflex Debugger and press the debug button to add REFLEX_DEBUG to Scripting Define Symbols
    • Check that Reflex Debugger works and REFLEX_DEBUG is present in the Scripting Define Symbols
    • Create new Build Profile
    • Use "Add Settings > Scripting Defines" and add REFLEX_DEBUG
    • Check that Reflex Debugger works and removes REFLEX_DEBUG from Scripting Define Symbols on the debug button press; it also doesn't allow adding REFLEX_DEBUG afterward
  • REFLEX_DEBUG set in Build Profile/Player Settings.
    • Create new Build Profile
    • Use "Add Settings > Player Settings"
    • Open Reflex Debugger and press the debug button to add REFLEX_DEBUG to the Scripting Define Symbols defined in the Build Profile/Player Settings
    • Check that Reflex Debugger works and REFLEX_DEBUG is present in the Build Profile/Player Settings Scripting Define Symbols but not in the global ones
    • Open Reflex Debugger and press the debug button again to remove REFLEX_DEBUG from the Scripting Define Symbols defined in the Build Profile/Player Settings
    • Check that Reflex Debugger is disabled and REFLEX_DEBUG is not present in the Build Profile/Player Settings Scripting Define Symbols

Test Configuration:

  • Firmware version: Unity 6000.6.4f1, Windows 11
  • Hardware: Intel Core Ultra 9, RAM 64 GB, NVIDIA RTX 5070 TI

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have performed manual tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have checked my code and corrected any misspellings
  • I have checked that Reflex.GettingStarted still runs nicely

EduardSmilyi and others added 2 commits October 10, 2026 21:45
- Introduced `DebuggerState` enum with flags for better state tracking.
- Refactored how `REFLEX_DEBUG` is checked using a helper method.
- Improved the tooltip with detailed state information.
- Added compilation request and warnings for specific scenarios.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant