Anyway I can test if an App is built for debug or release from within the App

As per the title, is there anyway I can test if the app thats running is compiled for Release or Debug?

I keepp getting caught by the IDE defaulting to Release when I make copies of a handcode project and then trying to break into the running App with the debugger.

TIA

Co-Pilot suggestion.

Glo:DebugMode = CHOOSE(_DEBUG_ = 1, TRUE, FALSE)
OMIT('DebugOnly',_RELEASE_)
  MESSAGE('This only shows in Debug mode')
!DebugOnly
?MESSAGE('Debug mode active')

Opted for this one…

    Program
    Code
    OMIT('DebugOnly',_DEBUG_)
        Halt(0,'Not Compiled for Debugging')
    !DebugOnly

It would be a nice bit of refinement if the IDE set the Build, Set Configuration to Release or Debug based on the build solution button clicked: “Start Debugging (Builds Solution)” sets configuration to Debug or “Start without Debugger (Build Solution)” sets configuration to Release.
JMO.