~ところで/~ところに/~ところを
Just at the point when … (stop there / someone comes / be caught or helped)
N3
V-dictionary / V-ている / V-ta + ところで / ところに / ところを
All three mark 'just at the point' of an action, but the main clause differs. ところで: at that point you stop or move on ({区切|くぎ}りのいいところで{休|やす}もう). ところに / ところへ: at that moment someone or something else arrives ({出|で}かけようとしていたところに{電話|でんわ}が{来|き}た). ところを: at that moment someone sees, helps or bothers you, often with passives or set phrases of thanks and apology ({忙|いそが}しいところをすみません). Do not confuse it with the sentence-initial conjunction ところで ('by the way').
Examples
作業が半分終わったところで、休憩にしましょう。
Let's take a break once half of the work is done.
帰ろうとしていたところに、班長から電話がかかってきた。
Just as I was about to go home, the team leader called.
お忙しいところを、手伝っていただいてありがとうございました。
Thank you for helping me when you were so busy.
Exercises
1.タバコを吸っている 、上司に見られてしまった。
2.ご飯を食べようとした 、友達が遊びに来た。