[erlang-questions] running trace (or similar)
Loïc Hoguin
essen@REDACTED
Tue Jul 21 16:13:42 CEST 2015
On 07/18/2015 11:44 PM, Ben Hsu wrote:
>
> Hello
>
> I am learning erlang by playing with a small webapp. The webapp is
> written in Cowboy with erlang.mk <http://erlang.mk>
>
> "make" creates a binary in _rel and I can use this binary to start a
> console.
>
> ./_rel/fiar/bin/fiar console
>
> I would like to debug this app using something like dbg:trace. dbg:trace
> doesn't work from the console, but dbg:tracer doesnt seem to work:
>
> (fiar@REDACTED <mailto:fiar@REDACTED>)1> dbg:tracer().
> ** exception error: undefined function dbg:tracer/0
>
> 1: how can I make dbg:tracer() work?
You need to add 'runtime_tools' to the list of applications in your
release configuration in relx.config (next to your own application).
> 2: are there any other tools to look into the running app? What do you
> recommend?
Recon is probably a good idea for a production system.
You can also add observer there, if you are a beginner to Erlang.
> Thank you for helping me learn Erlang
>
> [1] In case you're wondering, its FIAR : https://github.com/inaka/fiar
--
Loïc Hoguin
http://ninenines.eu
Author of The Erlanger Playbook,
A book about software development using Erlang
More information about the erlang-questions
mailing list