Make sure your veterinarian performs a thorough physical exam on your dog. The next step usually involves taking x-rays of the neck and chest. Blood tests help identify infections, heartworm disease, and any organ system problems. Some common causes of coughing and gagging include foreign objects in the airway, bronchitis, bacterial pneumonia, heart disease, laryngeal paralysis, fungal infections, reflux esophagitis (similar to heartburn in people), food allergies, parasites, tumors, and other diseases. Environmental factors such as exposure to cigarette smoke, new perfumes, or new bedding or carpeting can also aggravate coughing. For mild episodes, massaging your dog’s throat may help lessen the symptoms. In difficult cases, I recommend getting a second opinion from a board-certified specialist in veterinary internal medicine.