do not collect debug information if debugging is off (avoid memory exhaustion)