Old standby for a quick look into your code
Works with anything that implements the String.Chars protocol, AKA the to_string method. Elixir ships with: https://github.com/elixir-lang/elixir/blob/e769afbed96b6b9eee6a4f4ac4a6ea00bc0630f7/lib/elixir/lib/string/chars.ex
Returns the term handed to it untouched so you can plop it straight in your code
Can be configured with options: http://elixir-lang.org/docs/master/elixir/Inspect.Opts.html
Not to be confused with Kernel.inspect
**< 1.4 **
[1, 2, 3]
|> (fn(a) -> IO.puts("Before"); IO.inspect(a) end).()
|> Enum.map(&(&1 * 2))
|> (fn(a) -> IO.puts("After"); IO.inspect(a) end).()
|> Enum.sum
**> 1.4 **
[1, 2, 3]
|> IO.inspect(label: "before")
|> Enum.map(&(&1 * 2))
|> IO.inspect(label: "after")
|> Enum.sum
Returns the warning along with a stack trace.
Quickly look into the active scope
require IEx
IEx.pry()
To resume
respawn
A tool for inspecting running code.
:debugger.start()
:int.ni(ModuleName)
:int.break(ModuleName, line_num)
or graphically
An insight tool for all kinds of metrics for a running BEAM node.
:observer.start()
iex --name sally -S mix s
epmd -names
iex --name bob
Node.connect(:"[email protected]")
:observer.start()
- Nodes -> sally