(someone)(did something)(doing something)
Talk about an accident that happened while a person was doing something:
I ripped the page trying to pull it out of the folder.
This means "I ripped the page while I was trying to pull it out of the folder."
She tripped going up the stairs.
This means that she tripped while she was going up the stairs.
The two things should be very closely connected. If two things happened at the same time, but they're not connected, you should use a different structure like this:
I dropped my phone in the airport when I was walking to my gate.
Follow PhraseMix