This could be caused by a heart problem or a collapsing trachea. Your dog needs a thorough physical and medical work up to determine the cause and effective treatment.