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.
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_...
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With