In libraries #If DebugBuild is ignored

When I use
#If DebugBuild
in my own library, it is ignored in the app when starting in the IDE.
Does anyone know this problem? For me, this means that my own libraries are useless.

Yes, that’s not supported for Libraries. Xojo introduced IsDebugBuild ( IsDebugBuild — Xojo documentation ) for Library usage in 2025r3.1

This can be useful in Libraries running in projects so the Library can determine if it is running in the IDE/Debugger or in a standalone application.

OK. Thanks for the tip. I’ll try that right away.

If #if <boolean constant> works, you could set it based on debug build in a pre-build script.