When I start an interactive shell with
iex
I have access to Erlang dbg (:dbg).
When I start with
iex -S mix
:dbg is not available.
I think I am missing something in mix.exs.
The app is created with
mix new app
I have not edited anything.
$ iex
Erlang/OTP 25 [erts-13.2.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit:ns]
Interactive Elixir (1.15.4) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> :dbg.h
The following help items are available:
p, c
- Set trace flags for processes
tp, tpl, ctp, ctpl, ctpg, ltp, dtp, wtp, rtp
- Manipulate trace patterns for functions
n, cn, ln
- Add/remove traced nodes.
tracer, trace_port, trace_client, get_tracer, stop, stop_clear
- Manipulate tracer process/port
i
- Info
call dbg:h(Item) for brief help a brief description
of one of the items above.
:ok
OTP26 is fine too
$ iex
Erlang/OTP 26 [erts-14.0.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit:ns]
Interactive Elixir (1.15.2) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> :dbg.h
The following help items are available:
p, c
- Set trace flags for processes
tp, tpl, ctp, ctpl, ctpg, ltp, dtp, wtp, rtp
- Manipulate trace patterns for functions
n, cn, ln
- Add/remove traced nodes.
tracer, trace_port, trace_client, get_tracer, stop, stop_clear
- Manipulate tracer process/port
i
- Info
call dbg:h(Item) for brief help a brief description
of one of the items above.
:ok
Thank you. Adding :runtime_tools to extra_applications: solved it.
I tried adding :dbg to extra_applications: and that did not help. Should have kept trying.