I have been trying to get function call history for an application i’m developing.
Short of putting IO.puts at the start of each function call… is there a way the Dbg module (or any other module) can help with this?
I put this line in my application start:
defmodule BotHost do
@moduledoc false
use Application
def start(_type, _args) do
import Supervisor.Spec, warn: false
Dbg.local_call(BotHost.Processor, :c)
It seems to do nothing…
Please any suggestions/ help.
Is there a better way to see a detailed function call trace while an application is working… more or less equivalent to adding IO.puts into each function call
According to the docs (which where easier to find if you had at least linked the package you are talking about) that call should return a map, have you tried to inspect it?
I just skimmed the read me on github and it seems as if you need to enable call tracing for the process first via Dbg.trace(self(), :call). Also all tracing seems to be process local.