Trace basics

Raimo Niskanen raimo.niskanen@REDACTED
Fri Feb 28 10:44:09 CET 2003


Well, a process cannot trace itself. It would be a mess.

If you do not give the option {tracer,TracerPid}, the default is 
{tracer,self()}.

So, you could try erlang:trace(self(), true, [{tracer,TracerPid}]) 
called from the tracee (process to be traced) where TracerPid is another 
process prepared to receive trace messages.

Or, erlang:trace(TraceePid, true, []) called from the tracer.

/ Raimo Niskanen, Erlang/OTP, Ericsson AB



Thomas Fee wrote:
> Can someone explain why
>    erlang:trace (self(), true, [])
> gets a badmatch but
>    erlang:trace (all, true, [])
> would be OK?
> 
> The doc says the 1st argument is a PidSpec which is either a pid for a 
> local process, or an atom like existing, new, all, etc.
> 




More information about the erlang-questions mailing list