Add debugging functions.