〜ところに/ところへ
Just when… (something else cuts in)machine translation
FormationVerb ている-form/た-form + ところに・ところへ
〜ところに・ところへ expresses "right at the moment of A, B happened," and B is usually an unplanned interruption: シャワーを浴びているところに友達が来た (just as I was taking a shower, a friend came over). The second clause tends to use "appearing" verbs such as 来る, かかってくる, 訪ねてくる.
The form of the verb before ところ determines the timing: 〜ているところに (right in the middle of), 〜たところに (just after finishing), 〜ようとしたところに (just as one was about to). ところに and ところへ are nearly interchangeable; へ leans toward the direction of movement of the interrupting event.
Compared with 〜最中に, which also means "in the middle of," ところに stresses the "moment" and the interruption changing the situation, while 最中に stresses that the action is at its peak. The sentence いいところに来た (you came at just the right time) is this pattern's memorable stock phrase.
Examples
出かけようとしたところに、電話がかかってきました。
Just as I was about to go out, the phone rang.
シャワーを浴びているところに、友達が訪ねてきた。
Just as I was taking a shower, a friend dropped by.
いいところに来たね。ちょうど手伝ってほしかったんだ。
You came at just the right time. I was just hoping someone would help me.