I noticed that the line number is available when looking at the call stack window. Can we get to these line numbers programmatically?
Unfortunately you can't. (at least not without some heroic effort like creating a custom runner that has a built in VBScript interpreter)
If you're trying to figure out context for the sake of debugging. A useful technique I've seen used is creating a global variable and using push at the beginning of every subroutine/function, and popping at the end of every sub routine and function to create a pseudo bread crumbs. https://gallery.technet.microsoft.co...6-6218141bf66d
What you get is a global variable that will contain the functional call stack. You can in your test framework include it in your error report, and makes debugging the errors that occur during unattended runs a little easier.