at the time; just as I was~
Expresses that an event occurs at the very moment of another action or state.
This pattern highlights that something happens exactly when you are in the middle of doing something or just after you have done it. It often carries a nuance of 'interruption' or 'convenient timing'. For example, you might say 'just as I was about to leave, the phone rang' — that moment is the ところに.
Use the past form たところに when the action is completed (e.g., 'just after I arrived'), and the ている form for an ongoing action (e.g., 'while I was eating'). The second clause often describes an unexpected event or something that happens at that precise moment. In conversation, it is common to use ところへ or ところを, but ところに is also standard. It is slightly more formal than plain 時に, but not overly stiff.