[erlang-questions] How would I trace how an application runs across several processes?

伍思宇 jpsiyu@REDACTED
Sun May 4 05:45:08 CEST 2014



I think the trace/3 and  dbg:tracer() method will helps. They can show us which method was called.





At 2014-05-04 05:37:58,"Yves S. Garret" <yoursurrogategod@REDACTED> wrote:

Hello,


Recently I've started a book called "Handbook of Neuroevolution through Erlang".  I love the book.  However, when it comes to wrapping my head about the nuts and bolts of the code written in the book, I'm finding this to be a rather difficult thing to do.

Basically, when I start up the project, I get about 10+ processes running.  It's rather difficult for me to visualize in my head how they all communicate and get along.  There are a lot of questions in my head along the lines of "If I wanted to change this input from an integer to an atom, would the app choke?  Where would it fail?  Why would it fail?".  When you're writing an app with just one thread, this is -- comparatively -- easier to take apart.  However, when you have multiple processes, the task seems to be exponentially increasing in complexity.


My question is this:  What strategies and tools do you use to look at existing code and figure out how it works?


Secondly, I'm not terribly happy with the existing debugger in Erlang and would love to know more about how the Erlang VM works.  What source should I look into?  I've heard of a specific book, is it Joe Armstrong's Programming Erlang?  I'm obviously new to the VM and would like to gain understanding of how it works over time.

Thanks in advance,

--Yves
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140504/5b8ddf2f/attachment.htm>


More information about the erlang-questions mailing list