Elixir Debugging Tip: Finding Executed Functions Quickly

269
clicks
Elixir Debugging Tip: Finding Executed Functions Quickly

Source: elixirstreams.com

Type: Video

The content describes a debugging tip for Elixir developers to track which functions are being called during test execution. Instead of manually adding custom dbg/1 statements within each function, the author suggests leveraging Elixir's __ENV__ macro, which contains various pieces of contextual information. By calling __ENV__.function/0 within the functions, developers can automatically obtain the name of the function currently executing without having to specify it, simplifying the process of debugging and validating tests.

© HashMerge 2024