This is an expression to say that someone was just leaving (that you were literally or figuratively half way inside and outside of the door) and that you have just caught them before they left.
Examples:
I was half way out the door when the phone rang.
The thief was half way out the door when I noticed my wallet was missing.