[erlang-questions] dbg:trace does not work on remote shell

Nicolas Charpentier nc@REDACTED
Fri Jul 3 08:51:45 CEST 2009


Kaiduan Xie wrote:
> This is another question on dbg, it looks weird.
> 
> If I start an OTP application in the shell, the trace works well.
> 
> However, if an remote shell is attached to the running OTP application
> using -remsh (Remote shell is running on the same machine), trace does
> not work. There is no output of the trace on remote shell.
> 
> Any idea?
> 

Hi,
The output of dbg is done on the standard output of the first node. Dbg 
tracer that you have started use the group leader of your orininal node.
If you need to have the output on the second node you can use dbg:n/1 to 
  add all the node where trace pattern have to be activated.

  Start the first node.

$ erl -sname first



$ erl -sname debug
debug@REDACTED> dbg:tracer().
{ok,<XX,XX,XX>}
debug@REDACTED> dbg:n(first@REDACTED).
{ok,first@REDACTED}
debug@REDACTED> dbg:p(all,[c]).
{ok,[{matched,first@REDACTED,33},{matched,debug@REDACTED,34}]}
debug@REDACTED> dbg:tpl(....).


All the output will be done on the node debug@REDACTED



Regards,

---
Nicolas Charpentier
http://charpi.net


More information about the erlang-questions mailing list