[erlang-questions] Calling a function when a dbg call trace is hit?
Roger Lipscombe
roger@REDACTED
Thu May 15 10:40:54 CEST 2014
I'm attempting to track down a problem in our Erlang server, which is
caused by a particular client. My idea was this:
1. Add dbg:tpl on all processes to match the "hello" call from this
particular client (it sends its identity in the call). This would be
fairly lightweight.
2. (somehow) when that triggers, add some more dbg:tpl traces on that
specific process, across a selection of interesting modules.
So, I guess I've got a bunch of questions:
- Can I call arbitrary code when a dbg call trace is hit? Can that
code install more dbg hooks?
- It appears that all traces apply to all processes included in the
session? Can I have more than one dbg session, such that I match one
call in all processes, but more calls in a specific process?
Or am I barking up the wrong tree, and there's a better way to do this?
Thanks,
Roger.
More information about the erlang-questions
mailing list