Debug state logging.