erlang DBG question

Róbert Balogh (IJ/ETH) <>
Tue May 17 10:24:53 CEST 2005


Hej,

Thanks a lot for everyone who responded to me.

br,
/Robi

-----Original Message-----
From: 
[mailto:]
Sent: Tuesday, May 17, 2005 8:40 AM
To: 
Subject: Re: erlang DBG question


Róbert Balogh (IJ/ETH) wrote:
> Hej dbg experts,
> 
> I'm a beginner on tracing erlang, and I have a small problem. None
> the less that I read the ERTS user's doc about Match specification I
> don't understand how can I build a match specification if I have a
> module:function where the function has 2 input parameter like A, and
> B and I'd like to see that "trace messages" when the A is equal 2.
> Could anybody help me about it?

the following has been tested with lists:nth/2.

dbg:tpl( Module,
	Function,
	[{['$1', '_'],
		[{'==', '$1', 2}],
		[]}] ).


i have started dbg with the ''magical''

dbg:tracer().
dbg:p( all, [call] ).

which may, or may not, be of significance.


bengt



More information about the erlang-questions mailing list