+ Start a Discussion
boBNunnyboBNunny 

Get Stack Trace without an Exception

Does anyone know if there is a way to get the stack trace from APEX without generating an Exception  to slow things down?  I have something that might be called in a Loop and want to know precisely where it came from without having to generate a false exception.  Thanx!
YuchenYuchen
Maybe you can add some debug logs to your Apex code and turn on "Debug Logs" to check the details.
boBNunnyboBNunny
Yes, but I need to actually record where it’s coming from. Thanx though!
Tom Gagne 39Tom Gagne 39
Just new-up a new exception and get the stacktrace.  No need to "throw" or "catch" it.