thanks for your query at hcm.chest pain
during the cough can be due to plueritis.
it means inflammation of pleura
,its structure that is covering lung. when ever pleura is inflammed it will cause severe pain
my recommendation would be you can repeat chest x ray
, consult physician for further investigation and management.