Quantcast

Debug help

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Debug help

Nick S
Hi,

I would like to write a separate module, which would catch/indicate, when some functions are executed in other modules.

For example,

otp/gen_server

handle_call(new_msg,...)            %% do not catch this line

handle_call(....) ->                       %% catch this line i.e. when all above conditions doesn't match.

Which debug tool would be best for my needs?
Also would like to include some timing measurements, later on.

Nick.


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Debug help

Tobias
Hi Nick,

For such a purpose, I'd take gen_event [1] and/or the dbg module [2], and erlang:statistics might also be of some help here. Since I'm quite new to Erlang, I'd be very interested in more/other suggestions, too.

[1] http://www.erlang.org/doc/design_principles/events.html
[2] http://stackoverflow.com/questions/1954894/using-trace-and-dbg-in-erlang/1954980#1954980

Cheers,
Tobias

On Jun 25, 2011, at 1:39 PM, Nick S wrote:

> Hi,
>
> I would like to write a separate module, which would catch/indicate, when some functions are executed in other modules.
>
> For example,
>
> otp/gen_server
>
> handle_call(new_msg,...)            %% do not catch this line
>
> handle_call(....) ->                       %% catch this line i.e. when all above conditions doesn't match.
>
> Which debug tool would be best for my needs?
> Also would like to include some timing measurements, later on.
>
> Nick.
>
> _______________________________________________
> erlang-questions mailing list
> [hidden email]
> http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Loading...