only enter debug mode if debug cookie is set