Getting hold of a process backtrace info?

The function call erlang:process_display(whereis(user), backtrace) print the process backtrace.

Is it possible to get hold of that backtrace printout in any way (e.g like a binary string)?

That would be mighty nice!
Cheers, Tobbe

3 Likes

Yes, you can use erlang:process_info(Pid, backtrace). Returned value is {backtrace, Bin}, and according to docs:

Binary Bin contains the same information as the output from erlang:process_display(Pid, backtrace).
1 Like

Hehe geez…I searched for ‘backtrace’ on the Docs page, didn’t see anything useful,
but missed the little link at the bottom saying “see all 55 results”…

Ok, case closed, thanks!

4 Likes