I think dogs are capable of hacking/coughing to get attention if it works for them. Mine does it sometimes. I have been very careful about not rewarding him when he does it so that he doesn't continue to do it but most of the time, I give in

. He usually does it when he wants something that you are holding and no one is aware that he wants it. He will make the sound almost like he cannot breath and for sure he gets attention. for it He is not sick and I know for sure he does it for attention.