|
|
|
|
|
by rhizome31
2884 days ago
|
|
As someone who resort to IEx.pry daily I'm curious if you have any tip to share about your workflow so that you don't need a debugger. To you use typespecs and Dializer? (I haven't looked into those yet.) My experience is that a good share of bugs is avoided thanks to immutability, but I still get nil-related issues now and again. |
|
In Ruby, if I'm trying to find the source of a dynamically generated method in a dynamically generated class, that usually requires me to run add a debug statement, run the program, and see what's being passed. Even if I have a stacktrace, I often find it difficult to understand what the code is doing without running it.
I find Elixir code easier to read, and grepping my way through the code base is often enough. And to be fair, a debugger is often less than useful in macros involving AST & when dealing with a process that got a random message from who knows where.