tracing function call arguments, was Re: erlang trace tutorial

Gerd Flaig gerd@REDACTED
Sat Oct 23 15:43:29 CEST 2004


Reto Kramer <kramer@REDACTED> writes:

> Can anyone point me to a hands-on tutorial out there that would 
> introduce me to Erlang's tracing facilities?

I would also be interested to learn more about Erlang tracing,
particularly how I can trace function call arguments. As far as I
understand, I have to compile the module with +local (which is not
mentioned in compile(3erl) where the rest of the compiler options is
documented), then dbg:p(Pid, c) and dbp:tp(MyModule,
[{'_',[],[{return_trace}]}]). This gives me a nice trace indeed

   (<0.32.0>) call t1:a/1
   (<0.32.0>) call t1:b/1
   (<0.32.0>) returned from t1:b/1 -> {foo,foo}
   (<0.32.0>) returned from t1:a/1 -> {foo,foo}
   (<0.32.0>) returning to t1:r/0
   (<0.32.0>) call t1:a/1
   (<0.32.0>) call t1:b/1
   (<0.32.0>) returned from t1:b/1 -> {bar,bar}
   (<0.32.0>) returned from t1:a/1 -> {bar,bar}
   (<0.32.0>) returning to t1:r/0
   (<0.32.0>) call t1:b/1
   (<0.32.0>) returned from t1:b/1 -> {baz,baz}
   (<0.32.0>) returning to t1:r/0

but no arguments. Is there a way to get the arguments?

      Goodbyte, Gerd.
-- 
Gerd Flaig                     Technik                gerd@REDACTED
Bei Schlund + Partner AG       Brauerstraße 48      D-76135 Karlsruhe
 Physics is like sex: sure, it may give some practical results,
 but that's not why we do it. -- Richard Feynman

-------------- next part --------------
A non-text attachment was scrubbed...
Name: t1.erl
Type: text/x-erlangsrc
Size: 233 bytes
Desc: trace experiment
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20041023/4621d0a3/attachment.bin>


More information about the erlang-questions mailing list