A tty based interface to the Erlang debugger/tracer and a supervisor tree browser.
The purpose of edbg is to provide a simple and intuitive
interface to the Erlang debugger and the builtin tracing functionality.
Especially when tracing in the BEAM machine, it is easy to be swamped
by all the trace messages that are generated. edbg will avoid that
by presenting a clean function call graph, indented according to the call
depth. edbg provide means to search for a particular function call,
or an arbitrary string among the function arguments or return values;
you may then inspect the content of only those arguments you are
interested in.
edbg now also support Elixir!
Example: The call graph
10: <0.258.0> yaws_server:gserv_loop/4
11: <0.281.0> yaws_server:acceptor0/2
12: <0.281.0> yaws_server:do_accept/1
13: <0.259.0> yaws_server:aloop/4
Example: Display content of a function call argument
tlist> pr 177 2
Call: yaws_server:handle_request/3 , argument 2:
-----------------------------------
#arg{clisock = #Port<0.6886>,
client_ip_port = {{127,0,0,1},35871},
headers = #headers{connection = undefined,accept = "*/*",
host = "localhost:8008",if_modified_since = undefined,
if_match = undefined,if_none_match = undefined,
...snip...
edbg consists of two main parts:
and a couple of auxillay tools:
- Supervision Tree Browser
- Linked Tree Browser
- MCP Server — AI-assisted tracing via Model Context Protocol
If you don't like GUI's, edbg may be your cup of tea.
Or, for example, you work from home but still want to debug your code
at your work desktop without the hassle of forwarding a GUI,
then edbg is perfect.
You can see examples of how to use edbg in
the wiki pages, or
here.
Run: make
Add: code:add_path("YOUR-PATH-HERE/edbg/_build/default/lib/edbg/ebin").
Add: code:add_path("YOUR-PATH-HERE/edbg/_build/default/lib/pp_record/ebin").
Add: code:add_path("YOUR-PATH-HERE/edbg/_build/default/lib/httpd_router/ebin").
to your ~/.erlang file.
If you don't fancy rebar and favour plain Make + Erlc then:
Run: make old
Add: code:add_path("YOUR-PATH-HERE/edbg/ebin").
Add: code:add_path("YOUR-PATH-HERE/edbg/deps/pp_record/ebin").
Add: code:add_path("YOUR-PATH-HERE/edbg/deps/httpd_router/ebin").
to your ~/.erlang file.
A Hex package exist so to use as an Elixir Mix dependency, add this to your list of deps:
< 775E div class="highlight highlight-source-erlang notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" {:edbg, "~> 0.9.6"}"> {:edbg, "~> 0.9.6"}