DbgMate.Backport (dbg_mate v0.1.0)
This module includes features that will be enabled in elixir 1.18,
plus a commit for with
that was not merged.
Backport module currently includes dbg implementation for:
- pipes
- binary operators: and, or, ||, &&
- code blocks wrapped in brackets
- conditions: case, cond, if, unless, with
To use it just set the config value in config or run this before your dbg call
Application.put_env(:elixir, :dbg_callback, {DbgMate,Backport, :dbg, []})
Summary
Functions
Default backend for Kernel.dbg/2
.
Types
Link to this type
captured_remote_function()
@type captured_remote_function() :: (... -> any())
Link to this type
input()
The inputs of a macro
Link to this type
metadata()
@type metadata() :: keyword()
Link to this type
output()
@type output() :: output_expr() | {output(), output()} | [output()] | atom() | number() | binary() | captured_remote_function() | pid()
The output of a macro
@type t() :: input()
Abstract Syntax Tree (AST)
Functions
@spec dbg(t(), t(), Macro.Env.t()) :: t()
Default backend for Kernel.dbg/2
.
This function provides a default backend for Kernel.dbg/2
. See the
Kernel.dbg/2
documentation for more information.
This function:
- prints information about the given
env
- prints information about
code
and its returned value (usingopts
to inspect terms) - returns the value returned by evaluating
code
You can call this function directly to build Kernel.dbg/2
backends that fall back
to this function.
This function raises if the context of the given env
is :match
or :guard
.