def is_debug(app=None): """ Check if the debug flag was passed on the command line. Args: app: The Cement application instance. Returns: bool: True if --debug was explicitly passed, False otherwise. """ if app is None: return False return bool(getattr(app.pargs, 'debug', False))