After entering a sub how can I determine where I came from

I am trying to diagnose an issue in some code. I have traced the issue to when I try and exit the existing sub routine and go back to the place where the sub was originally called from. how can I determine where I came from previously? I did not write this code so that’s why I don’t know what comes from where.

Subject: It’s different for different programming languages.

If LotusScript, see GetThreadInfo.

Subject: it’s LotusScript

thx, I will try GetThreadInfo.

Subject: yep, GetThreadInfo(14)

infoID = 14 is undocumented, but seems to work o.k. It produces a minimal call stack.

Subject: it