Log where in a method an exception occurred

In there any (easy) way to log where in a method an exception happened?

If an exception happens when running outside of the debugger, I catch it and log it and the error type. However if I have a long method, it might be hard to tell, for example, what cause the nil object exception.

Right now, all you can do is use the debug log liberally to narrow it down. Eventually the exception will give you the means to identify the line in your code.

With break on Exception on, the code should stop right at the line where the exception occurs.

I think he’s talking about compiled apps.

Yes, that’s right.

The only feedback case is ancient and closed. I’ve made a new one if anyone is interested:

Add Line Number Introspection For Exceptions
<https://xojo.com/issue/46519>

Add yourself to <https://xojo.com/issue/15331> . I dimly remember Joe Ranieri saying that this might be possible to do with LLVM (a.k.a 64bit).

Thanks Beatrix!