Add debug support for contrib/test