dbg:p/2

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

dbg:p/2

Peter J Etheridge
dear friends,
i am trying to debug a message sent.

when i run;
dbg:p(registered_name, [m]).

{ok, [{matched,new_node@localhost,1}]}

what is the next step ?

thank you in advance.
peter


Reply | Threaded
Open this post in threaded view
|

Re: dbg:p/2

bengt e
Greetings,

Provided that you have started a receiver (ex: dbg:tracer()) you will then see any message sent to ‘registered_name’ printed in the Erlang shell.

Example of printout (the lines starting with 
(<0.69.0>)):
2> dbg:tracer().
{ok,<0.66.0>}
3> procslinked:starter().
Receive init_done from P1
{<0.69.0>,okbeud}
4> dbg:p(pidfirstp, [m]).
{ok,[{matched,nonode@nohost,1}]}
Receive init_done from P2
Receive init_done from P3
5> (<0.69.0>) << timeout
(<0.69.0>) << {<0.72.0>,init_done}
(<0.69.0>) <0.52.0> ! {io_request,<0.69.0>,
                          #Ref<0.4081920205.1462501377.51659>,
                          {put_chars,unicode,io_lib,format,
                              ["Receive init_done from P2~n",[]]}}
(<0.69.0>) << {io_reply,#Ref<0.4081920205.1462501377.51659>,ok}

Best Wishes,
bengt

On 16 Jan 2020, at 04:09, Peter J Etheridge <[hidden email]> wrote:

dear friends,
i am trying to debug a message sent.

when i run;
dbg:p(registered_name, [m]).

{ok, [{matched,new_node@localhost,1}]}

what is the next step ?

thank you in advance.
peter