Thanks for your query.
Though you have mentioned that your child is being given ambroxol
but you have not mentioned the reason for being given this medicine. Ambroxol can be given to children below 2 years of age.
Regarding your query of the child crying while passing urine, you need to get the urine examined to rule out urine infection. Urine infection can be the cause of the child crying.
I hope I have answered your query to your satisfaction.
Wishing your child an early recovery.