Various helper functions intended to make debugging more convenient.