Debug function call that hangs in Erlang

It seems like I have a dead end somewhere in my code or in the code I use, but I'm not sure how to debug it. Since I do not know where the problem is, and I can make the system almost completely inactive, I think it would be useful to see a trace of all the functions and messages leading to a hang. It seems to dbgprovide some help with tracking, but I don't see how to configure it for such a wide trace. Is such tracing possible with dbgor are there any other better ways to debug freezes in Erlang?

+1
source share
2 answers

I recommend using dbg. Although there is a regular debugger, as indicated in another answer, its usefulness is very limited for concurrent programs, as this usually causes a lot of timeouts.

To overcome the barrier to use dbg, I recommend the following resources:

All the answers here are interesting, but especially user_default in related helps as well

An example of what you can do by processing trace messages yourself , which can be useful in severe debugging cases.

Continuously updated links and sites about Erlangs dbg

If you need to use dbgin production, I recommend using redbug , which will help you not reset your node. Blogpost about using redbug

+1
0

Source: https://habr.com/ru/post/1687291/


All Articles