Coughing with white foamy sputum may be related to chronic bronchitis, bronchiectasis, lung cancer, etc., and can be treated with medication or surgery. 1. Chronic bronchitis: Chronic bronchitis can be caused by external irritation of the bronchial tubes, resulting in a prolonged cough with white foamy sputum, in addition to coughing up sputum can also be accompanied by shortness of breath, wheezing and other symptoms. The use of compound licorice tablets, acetylcysteine, etc. can be prescribed by the doctor, while paying attention to rest, appropriate exercise. 2. Bronchial dilatation: patients with bronchial dilatation have white foamy sputum due to recurrent respiratory infections, which can be accompanied by coughing up blood and sputum. It can be treated with drugs such as Ambroxol Hydrochloride and Carbazochrome as prescribed by the doctor. 3. Lung cancer: Some patients with early stage of lung cancer may have prolonged cough with white foamy sputum, which may be caused by stimulation of cancerous tumor, and may be accompanied by blood in sputum, chest pain and other symptoms. Surgery is recommended for patients who meet the indications of surgery, and those who cannot undergo surgery can follow the doctor’s instructions to use drugs, such as etoposide, irinotecan, cisplatin and carboplatin. There are many other reasons for prolonged coughing with white foamy sputum, such as chronic obstructive pulmonary disease, acute left heart failure, etc. It is recommended that patients go to the regular hospital in time, cooperate with the doctor to complete the relevant examinations, clarify the cause and actively deal with it.