I need to debug some module in foreign system. The module has public function foo() - how can I know place (module and function name) from which foo() given module
foo()
io:format("~s~n", [element(2, process_info(self(), backtrace))]).
self() can be replaced by any other pid (rpc:pinfo should even work with remote procs). This helps if you cannot even modify the source or beam.