apparently this only works if DEBUG is defined, go figure...