The way I implement this is having it checked it ONCE when the first LotusScript application initialization happens, and set the global Integer noDebug published by the global error reporting library that is used throughout the code.
Additionally, almost any error handler installing code is coded thus:
If noDebug Then On Error Goto bublUp
noDebug is set to True in the init routine, False if the LotusScript debugger is active. So then when an error happens, the Debugger window pops up instead of the error handler being called.