When tracing function calls using redbug from an Erlang shell, I can trace multiple functions at the same time by passing a list of strings to redbug:start:
redbug:start(["foo:bar -> return", "bar:baz -> return"], []).
Using redbug from the command line, I can trace a single function without problems:
redbug -setcookie s3cret mynode@localhost "foo:bar->return"
But I can't seem to find a way to trace multiple functions from the command line. Is that possible? If so, how?
./priv/bin/redbug -setcookie s3cret mynode@localhost '"foo:bar->return","foo:baz->return"'
or
./priv/bin/redbug -setcookie s3cret mynode@localhost '["foo:bar->return","foo:baz->return"]'
You can pass comma separated list of strings, but you can't use spaces. Redbug internally surrounds input with "[" and "]" and then tries to parse that expression with erl_scan and erl_parse. If it fails, then it passes unparsed string (that is why syntax for one function is easy). If it succeeds, it calls:
redbug:start(["foo:bar->return", "foo:baz->return"], []).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With