erlang dbg module not work when use relx

215 views Asked by At

I modified relx.config in a cowboy example,add runtime_tools {release, {echo_get_example, "1"}, [runtime_tools, echo_get]}. {extended_start_script, true}.

when I use dbg:start() -> dbg:tracer() -> .... nothing outputs when calls then functions. why?

1

There are 1 answers

2
Adam Lindberg On

Since you can actually call the dbg module you have most likely succeeded in including it in the release.

Are you connecting with a remote node? In that case, you have to tell dbg to trace on the node you're connected to:

debugger@localhost> dbg:tracer().
{ok,<0.35.0>}
debugger@localhost> dbg:n(target@host).
{ok,target@host}
debugger@localhost> dbg:p(all, call).
{ok,[{target@host,33},{debugger@localhost,34}]}
debugger@localhost> dbg:tp(...)

More details here and in the documentation for dbg.