DEV Community

Discussion on: Inspector, a better way to debug Elixir Code

Collapse
 
cheerfulstoic profile image
Brian Underwood

This is awesome! I wonder if this could be used to do something I've been vaguely thinking about for a long time. I very, very, very often do this to trace a specific variable:

IO.inspect(variable, label: :variable)
Enter fullscreen mode Exit fullscreen mode

I thought it would be nice if you could just do something like inspect_v(variable) and have it do that for me. I didn't realize that binding() gives you a keyword list of the currently scoped variables, so maybe this is something that you could add to inspector?

Collapse
 
marciol profile image
Marcio Lopes de Faria

Yes sure, I'll include it next week when I'll get some free time. Stay tunned