Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
How do I trace by module name?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Alex Shneyderman  
View profile  
 More options Oct 27 2012, 6:16 am
From: Alex Shneyderman <a.shneyder...@gmail.com>
Date: Sat, 27 Oct 2012 12:16:03 +0200
Local: Sat, Oct 27 2012 6:16 am
Subject: [erlang-questions] How do I trace by module name?
I am trying to use dbg. Here is what I did:

Erlang R15B (erts-5.9) [source] [64-bit] [smp:8:8] [async-threads:0]
[hipe] [kernel-poll:false]

Eshell V5.9  (abort with ^G)
1> compile:file("fib.erl",[debug_info]).
{ok,fib}
2> dbg:tracer().
{ok,<0.38.0>}
3> dbg:tpl(fib,c).
{ok,[{matched,nonode@nohost,3},{saved,c}]}
4> fib:fib(21).
231
5> dbg:ltp().
c: [{'_',[],[{message,{caller}}]}]
caller_exception_trace: cx
caller_trace: c
cx: [{'_',[],[{exception_trace},{message,{caller}}]}]
exception_trace: x
x: [{'_',[],[{exception_trace}]}]
ok

Or something is amiss with my code, dbg or something else? Any ideas?
Or can I even trace by module. I tried to trace by process and that worked
fine.

Cheers,
Alex.
_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Yang Liu  
View profile  
 More options Oct 27 2012, 7:29 am
From: Yang Liu <liuyang124...@gmail.com>
Date: Sat, 27 Oct 2012 19:28:50 +0800
Local: Sat, Oct 27 2012 7:28 am
Subject: Re: [erlang-questions] How do I trace by module name?

I always use this, i call it at start, then it trace every call on the
module

open_tracer(Module) ->
     dbg:tracer(),
     dbg:p(all, [call]),
     dbg:tpl(Module, [{'_', [], [{return_trace}]}]).
 在 2012-10-27 傍晚6:16,"Alex Shneyderman" <a.shneyder...@gmail.com>写道:

_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alex Shneyderman  
View profile  
 More options Oct 27 2012, 11:24 am
From: Alex Shneyderman <a.shneyder...@gmail.com>
Date: Sat, 27 Oct 2012 17:24:24 +0200
Local: Sat, Oct 27 2012 11:24 am
Subject: Re: [erlang-questions] How do I trace by module name?
(one more time to the list):

great this works!

Is there any way to redirect traces to a file?  I mean with
specialized handler ...

_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Yang Liu  
View profile   Translate to Translated (View Original)
 More options Oct 27 2012, 8:41 pm
From: Yang Liu <liuyang124...@gmail.com>
Date: Sun, 28 Oct 2012 08:40:47 +0800
Local: Sat, Oct 27 2012 8:40 pm
Subject: Re: [erlang-questions] How do I trace by module name?

dbg:tracer
(port,dbg:trace_
port(file,{"/log/
trace",wrap,atom_
to_list(node
()),50000000,12})).
like at the function trace_port, and there is a discusstion i found
stackoverflow.com/questions/1954894/using-trace-and-dbg-in-erlang
在 2012-10-27 晚上11:24,"Alex Shneyderman" <a.shneyder...@gmail.com>写道:

_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joseph Wayne Norton  
View profile  
 More options Oct 27 2012, 10:22 pm
From: Joseph Wayne Norton <nor...@lovely.email.ne.jp>
Date: Sun, 28 Oct 2012 11:22:39 +0900
Local: Sat, Oct 27 2012 10:22 pm
Subject: Re: [erlang-questions] How do I trace by module name?

Alex -

I'd recommend taking a look at the redbug tool.  It provides nice features for tracing. (https://github.com/massemanet/eper/blob/master/src/redbug.erl)

Joe N.

On 2012/10/28, at 0:24, Alex Shneyderman <a.shneyder...@gmail.com> wrote:

_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »