There are many causes of chronic cough (lasting >8 weeks), and smoking is a common cause of cough. Smoke in any form, including tobacco and marijuana smoke, can paralyze the fine hairs in airways (cilia) which normally help clear air contaminants. Coughing is a reflex to help clear airways and may also be induced by inflammation. The single best thing you can do for your health is to quit smoking; if your cough doesn’t resolve you should seek further medical evaluation.
Vaporized cannabis is usually well-tolerated, although in certain patients with reactive airways (i.e. asthmatics) vapor may exacerbate their condition and invoke inflammation and cough. Vaporizing shredded flower is usually gentler than vaporizing extracted concentrates. If vaporizing continues to cause airway spasm and cough, consider switching to oral or ingestible formulations.
For anyone with smokers cough I would recommend a pure convection flower vaporizer like the Grasshopper. A flower convection vaporizer will heat the material, cannabis or tobacco, evenly and will never burn the plant material. This will lessen the irritation felt when compared with smoking.