evaluate query and response only if debug enabled