expression
Used before a verb phrase to indicate that something was on the verge of happening, often with a sense of narrowly avoiding an outcome. Frequently followed by ~するところだった or ~しそうになった.
もう少しで電車に乗り遅れるところだった。
I almost missed the train.
もう少しで忘れるところだった。
I nearly forgot.