Add a debug functionality