Diagnosing the underlying cause of a cough in cancer patients involves a thorough medical history and physical examination. Physicians may use imaging studies such as chest X-rays, CT scans, and PET scans to identify any abnormalities in the lungs or airways. Bronchoscopy, a procedure where a thin tube with a camera is inserted into the airways, can provide a direct view and allow for biopsy of suspicious areas. Pulmonary function tests and sputum analysis are other diagnostic tools that may be employed.