erlang DBG question

Bengt Kleberg <>
Tue May 17 08:39:37 CEST 2005


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