Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tracing the action of consuming messages from mailbox in Erlang

I went through the documentation of the trace/3 BIF in Erlang. However, one observation I have made is that it cannot be used for tracing the consuming of messages from the mailbox. The flag 'receive' only traces when messages are added to a process's mailbox.

Is there any way one can trace events such as reading from the mailbox using the receive construct? If not, is there any reason why this isn't possible? It seems very strange that one can trace most kind of events in a program and the reading of messages from a mailbox is not traceable.

like image 862
aseychell Avatar asked Nov 13 '22 16:11

aseychell


1 Answers

There is no such tool. You can only hope for call tracing of the handling function. It is rather easy in OTP applications since you can hook handle_....

like image 183
I GIVE CRAP ANSWERS Avatar answered Nov 25 '22 02:11

I GIVE CRAP ANSWERS