implemented debug switch via url