しているときに

while doing

→ 為る
phrase Uncommon #12,738
while doing Used after a verb in the ている form to describe something happening during an ongoing action or situation. ときに means “when” or “while.”
JA: 料理をしているときに、電話が鳴りました。
EN: The phone rang while I was cooking.

彼は人々が興奮しているときにはいつも離れている

He always keeps his distance when people get excited.

学校へ行く途中で通りを横断しているときに事故に遭った

I was in an accident while crossing the street on my way to school.

私はフットボールをしているときに脚を痛めた

I injured my leg while playing football.

彼は散歩しているときに不思議な男と偶然会った

He happened to run into a strange man while taking a walk.

仕事をしているときにの邪魔をしないでください

Please don't disturb me while I'm working.

退屈しているときに紙に落書きをしたことがありません

Have you ever doodled on paper when you were bored?

私は今朝道路の雪かきをしているときに滑ってけがをしてしまった

I slipped and injured myself while shoveling snow off the road this morning.