debugging mechanism