It is common when a cough is persistent or severe to have momentary chest pain each time a cough occurs. This pain that occurs only with coughing is not usually worrisome, and it usually comes from irritated airways. If you have chest pain that occurs when you breathe in or breathe out, or if you have chest pain that is continuous, then your chest pain may be a sign of a more serious illness.
Do you have continuous chest pain or chest pain that occurs when you breathe in or breathe out?
(Do not count momentary pain occurring only at the times that you cough.)