Meaning: your behaviour is going to get you into trouble
Example: The boy was walking on thin ice when he kept complaining and whining, when his mother told him it was time to go to bed.
See this Idiom in a story: Sports: Adam Dreams He is a Professional Hockey Player