My question is probably closely related to [this
one](https://japanese.stackexchange.com/questions/56839/how-to-
use-%E3%81%A8%E3%81%93%E3%82%8D%E3%81%A0%E3%81%A3%E3%81%9F-to-express-time-
related-events) but I wasn`t able to successfully apply the explanation to the
grammar of （もう少し/危うく）...ところだった

[On this site it is stated](https://nihongonosensei.net/?p=12827) that ところだった
is formed with 動辞形＋ところだった or 動た形＋ところだった to express the same thing, namely that
something almost happened. What I am struggling with is when to use which one
and why 動た形 can be used at all since it normally implies that something just
ended...

Also the only example sentence they actually use 動た形 is
もう少しブレーキを踏むのが遅れていたら死んでいたところだった。

  * Could 死んでいた here be replaced with 死ぬ？
  * Would the meaning stay the same?
  * Is the usage of 動た形 somehow connected to ～たら or could it be also used in a sentence like 目覚まし設定し忘れて、あやうく寝過ごすところだった making it 寝過ごしたところだった?
CC BY-SA 4.0
2020-11-05T12:46:54.220
82487
2021-12-30T06:20:05.390
2021-12-30T05:57:36.813
30454
31652
question
grammar tense
Difference between るところだった and たところだった
家から出るところで、電話がかかってきた → When I was leaving my home (I was in front of a door), I
got a call.

家から出たところで、電話がかかってきた → When I left home (door was behind of me), I got a call.

>   * Could 死んでいた here be replaced with 死ぬ？
>   * Would the meaning stay the same?
>

ナイフで刺されて、死んでいたところ → stabbed by knife I was dying (but now all fine, thanks to
medicine). that was long process  
道路を渡っている時、顔の前に車が走って、もう少しで死ぬところだった → when I crossed the road, a car passed in
front of my face. It was close to death. (I was about to die)
CC BY-SA 4.0
2020-11-05T13:02:32.283
82489
2021-12-30T06:20:05.390
2021-12-30T06:20:05.390
30454
40831
82487
answer