expede/inspector_gadget
Helpers for debugging & inspecting code flow
{ "createdAt": "2017-01-02T03:36:30Z", "defaultBranch": "master", "description": "Helpers for debugging & inspecting code flow", "fullName": "expede/inspector_gadget", "homepage": null, "language": "Elixir", "name": "inspector_gadget", "pushedAt": "2017-01-02T05:09:55Z", "stargazersCount": 8, "topics": [ "debug", "operator" ], "updatedAt": "2025-02-11T13:58:34Z", "url": "https://github.com/expede/inspector_gadget"}InspectorGadget
Section titled “InspectorGadget”Helpers for debugging & inspecting code flow
Quick Start
Section titled “Quick Start”def deps do [{:inspector_gadget, "~> 0.2.0"}]endSummary
Section titled “Summary”Inspect Flow
Section titled “Inspect Flow”import InspectorGadget1|> inspect_flow|> fn x -> x + 1 end.()|> fn y -> y * 100 end.()|> inspect_flow#=> 13:34:21.997 [info] inspect_flow: 1#=> 13:34:21.997 [info] inspect_flow: 200Overloaded Pipe
Section titled “Overloaded Pipe”use InspectorGadget.Pipe
1|> fn x -> x + b end.()|> fn y -> y * 100 end.()|> inspect#=> 13:42:24.250 [info] 1 |> fn(x) = 2#=> 13:42:24.250 [info] 2 |> fn(y) = 200#=> 13:42:24.250 [info] 200 |> inspect = "200"Note that this prints in the order of evaluation, so nested expressions are expected occur in a different sequence than the code
1|> fn(x, y) -> x + y end.( 6 |> fn z -> z * 10 end.())#=> 13:44:02.649 [info] 6 |> fn(z) = 60#=> 13:44:02.649 [info] 1 |> fn(x, y) = 61