Cough syrups simply suppress Jimmy’s urge to do so. This is not necessarily a good thing, since coughing keeps unwanted substances like dust and germs out of the airway. In asthma, especially, the cough helps by bringing up excess mucus. As a rule of thumb, if Jimmy is coughing without complaint, don’t interfere with his expectoration process.
If the cough is quite disabling, however, you may have to consider a cough suppressant. The over-the-counter varieties have a limited effect, which wears off after a couple of hours. The additives have potential side effects and few benefits. Prescription cough syrups are more efficient, especially when they contain codeine. A remote cousin of morphine, codeine can be habit-forming in adults, but this addiction is not an issue in kids. Used in appropriate doses, codeine is relatively safe.
My approach is to avoid cough syrups as much as possible since they don’t really work, their effect is short lived and all have some side effects.